12345678910111213141516171819202122232425262728293031323334353637383940 |
- package eliza
- type InteractiveBot interface {
- ReplyTo(statement string) (string, *Personality)
- }
- type Chatbot struct {
- Personality *Personality
- Context *ChatbotContext
- }
- type ChatbotContext struct {
- EngineVersion string
- Session SessionData
- }
- 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"`
- }
- 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"`
- }
|