Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ada ¶
Ada struct holding data shared across all Sessions created from this instance.
func (*Ada) LoadDataset ¶
Loads dataset from .json dataset into Ada instance.
This operation overwrites any existing dataset in instance.
func (*Ada) NewSession ¶
Creates a new session for chatting to Ada.
func (*Ada) SaveDataset ¶
Saves dataset to .json file from current Ada instance.
This operation overwrites any existing data in file.
type Dataset ¶
type Dataset struct {
Pairs []MessagePair `json:"pairs"`
}
Dataset holding all 'input' and 'output' messages for Ada to use
type MessagePair ¶
Type MessagePair implements the most basic storage for 'input' and 'output' messages
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Single session used for chatting with Ada.
func (*Session) GetResponse ¶
Returns best possible response to input text. If no "good enough" response could be found, returns a random string from the fallback dataset.
This function also trains the database with the new input.
2nd return parameter is response confidence. Lower score - less confident in response, higher score - more confident in response. This value ranges from [0..1] (approximately) Values below 0.2 are treated as not confident enough and will return fallback strings.