assistant

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const API_VERSION = "2020-04-01"

Variables

This section is empty.

Functions

This section is empty.

Types

type Generic

type Generic struct {
	Type string `json:"response_type"`
	Text string `json:"text"`
}

type Intent

type Intent struct {
	Intent     string  `json:"intent"`
	Confidence float32 `json:"confidence"`
}

type WABot

type WABot struct {
	UserId *string
	// contains filtered or unexported fields
}

watson assistant bot

var Bot *WABot

global watson bot

func ConnectWA

func ConnectWA(c *WAConfig) *WABot

func NewSession

func NewSession(c *WAConfig) *WABot

func (*WABot) Close

func (w *WABot) Close()

func (*WABot) Send

func (w *WABot) Send(msg string) *WAResult

type WAConfig

type WAConfig struct {
	ApiKey      string
	ApiUrl      string
	AssistantId string
	Version     string
}

Watson assistant configuration

type WAOutput

type WAOutput struct {
	Generic []Generic `json:"generic"`
	Intents []Intent  `json:"intents"`
}

type WAResult

type WAResult struct {
	Output WAOutput `json:"output"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL