Documentation ¶
Index ¶
- type Conversation
- type Mongo
- func (conv *Mongo) GetHistory(sid string) ([]map[string]interface{}, error)
- func (conv *Mongo) GetRequest(sid string, rid string) ([]map[string]interface{}, error)
- func (conv *Mongo) SaveHistory(sid string, messages []map[string]interface{}) error
- func (conv *Mongo) SaveRequest(sid string, rid string, cid string, messages []map[string]interface{}) error
- type Redis
- func (conv *Redis) GetHistory(sid string) ([]map[string]interface{}, error)
- func (conv *Redis) GetRequest(sid string, rid string) ([]map[string]interface{}, error)
- func (conv *Redis) SaveHistory(sid string, messages []map[string]interface{}) error
- func (conv *Redis) SaveRequest(sid string, rid string, cid string, messages []map[string]interface{}) error
- type Setting
- type Weaviate
- func (conv *Weaviate) GetHistory(sid string) ([]map[string]interface{}, error)
- func (conv *Weaviate) GetRequest(sid string, rid string) ([]map[string]interface{}, error)
- func (conv *Weaviate) SaveHistory(sid string, messages []map[string]interface{}) error
- func (conv *Weaviate) SaveRequest(sid string, rid string, cid string, messages []map[string]interface{}) error
- type Xun
- func (conv *Xun) GetHistory(sid string) ([]map[string]interface{}, error)
- func (conv *Xun) GetRequest(sid string, rid string) ([]map[string]interface{}, error)
- func (conv *Xun) Init() error
- func (conv *Xun) SaveHistory(sid string, messages []map[string]interface{}) error
- func (conv *Xun) SaveRequest(sid string, rid string, cid string, messages []map[string]interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conversation ¶
type Conversation interface { GetHistory(sid string) ([]map[string]interface{}, error) SaveHistory(sid string, messages []map[string]interface{}) error GetRequest(sid string, rid string) ([]map[string]interface{}, error) SaveRequest(sid string, rid string, cid string, messages []map[string]interface{}) error }
Conversation the store interface
type Mongo ¶
type Mongo struct{}
Mongo conversation
func (*Mongo) GetHistory ¶
GetHistory get the history
func (*Mongo) GetRequest ¶
GetRequest get the request
func (*Mongo) SaveHistory ¶
SaveHistory save the history
type Redis ¶
type Redis struct{}
Redis conversation
func (*Redis) GetHistory ¶
GetHistory get the history
func (*Redis) GetRequest ¶
GetRequest get the request
func (*Redis) SaveHistory ¶
SaveHistory save the history
type Setting ¶
type Setting struct { Connector string `json:"connector,omitempty"` Table string `json:"table,omitempty"` MaxSize int `json:"max_size,omitempty" yaml:"max_size,omitempty"` TTL int `json:"ttl,omitempty" yaml:"ttl,omitempty"` }
Setting the conversation config
type Weaviate ¶
type Weaviate struct{}
Weaviate Database conversation
func (*Weaviate) GetHistory ¶
GetHistory get the history
func (*Weaviate) GetRequest ¶
GetRequest get the request
func (*Weaviate) SaveHistory ¶
SaveHistory save the history
type Xun ¶
type Xun struct {
// contains filtered or unexported fields
}
Xun Database conversation
func (*Xun) GetHistory ¶
GetHistory get the history
func (*Xun) GetRequest ¶
GetRequest get the request history
func (*Xun) SaveHistory ¶
SaveHistory save the history
Click to show internal directories.
Click to hide internal directories.