Documentation ¶
Index ¶
- Constants
- type Bot
- type Client
- func (c *Client) Deploy(bot *Bot) (DeployResult, error)
- func (c *Client) GetBot(id string) (*Bot, error)
- func (c *Client) ListBots() ([]string, error)
- func (c *Client) RecogniseIntent(botID, text string) ([]IntentSimilarity, map[string][]string, error)
- func (c *Client) Signin(username, password string) (string, string, error)
- func (c *Client) Signup(username, fullname, email, password, orgName string) error
- func (c *Client) Whoami() (*User, error)
- type DeployResult
- type Entity
- type Intent
- type IntentSimilarity
- type Message
- type Next
- type State
- type User
Constants ¶
View Source
const DefaultServiceURL = "https://ai-bot-srv.nw.r.appspot.com"
DefaultServiceURL ...
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct { ID string `yaml:"id,omitempty" json:"id,omitempty"` Name string `yaml:"name,omitempty" json:"name,omitempty"` Language string `yaml:"language,omitempty" json:"language,omitempty"` InitState string `yaml:"init_state,omitempty" json:"init_state,omitempty"` Intents map[string]*Intent `yaml:"intents,omitempty" json:"intents,omitempty"` States map[string]*State `yaml:"states,omitempty" json:"states,omitempty"` Entities map[string]*Entity `yaml:"entities,omitempty" json:"entities,omitempty"` Synonyms []string `yaml:"synonyms,omitempty" json:"synonyms,omitempty"` }
Bot ...
type Client ¶
Client ...
func (*Client) Deploy ¶ added in v0.1.2
func (c *Client) Deploy(bot *Bot) (DeployResult, error)
Deploy ...
func (*Client) RecogniseIntent ¶ added in v0.1.5
func (c *Client) RecogniseIntent(botID, text string) ([]IntentSimilarity, map[string][]string, error)
RecogniseIntent ...
type Entity ¶ added in v0.1.8
type Entity struct {
Values []string `yaml:"values,omitempty" json:"values,omitempty"`
}
Entity ...
type Intent ¶
type Intent struct {
Examples []string `yaml:"examples,omitempty" json:"examples,omitempty"`
}
Intent ...
type IntentSimilarity ¶ added in v0.1.5
type IntentSimilarity struct { IntentID string `json:"intent_id"` Similarity float64 `json:"similarity"` }
IntentSimilarity ...
type Message ¶
type Message struct { Text string `yaml:"text,omitempty" json:"text,omitempty"` Options []string `yaml:"options,omitempty" json:"options,omitempty"` }
Message ...
type Next ¶
type Next struct { State string `yaml:"state,omitempty" json:"state,omitempty"` If string `yaml:"if,omitempty" json:"if,omitempty"` IfExpr ast.Expression `yaml:"-" json:"-"` }
Next ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.