package eliza // InteractiveBot This is the interface to comunicate with the bot type InteractiveBot interface { ReplyTo(statement string) (string, *Personality) } // Chatbot Defines data to be used by a chatbot personality - essentially // Its personality script and execution context type Chatbot struct { Personality *Personality Context *ChatbotContext } // ChatbotContext is the white board structure type ChatbotContext struct { EngineVersion string Session SessionData } // ChatbotInteraction defines a individual question/answer interaction with a caller // The raw answer is the response selected before any substitution type ChatbotInteraction struct { Time string `json:"time,omitempty" yaml:"time,omitempty"` Question string `json:"question,omitempty" yaml:"question,omitempty"` PatternGroup string `json:"patternGroup,omitempty" yaml:"patternGroup,omitempty"` Pattern string `json:"pattern,omitempty" yaml:"pattern,omitempty"` RawAnswer string `json:"rawAnswer,omitempty" yaml:"rawAnswer,omitempty"` Answer string `json:"answer,omitempty" yaml:"answer,omitempty"` } // SessionData defines information about the current bot and its interaction within a specific session type SessionData struct { SessionID string `json:"sessionID" yaml:"sessionID"` StartTime string `json:"startTime,omitempty" yaml:"startTime,omitempty"` User string `json:"user,omitempty" yaml:"user,omitempty"` Bot string `json:"bot,omitempty" yaml:"bot,omitempty"` BotVersion string `json:"botVersion,omitempty" yaml:"botVersion,omitempty"` Conversation []ChatbotInteraction `json:"conversation,omitempty" yaml:"conversation,omitempty"` }