Documentation
¶
Index ¶
- Constants
- type Chat
- func (c *Chat) Chat(message, threadID string) (string, error)
- func (c *Chat) FetchChatMessages(threadID string) ([]db.ChatModel, error)
- func (c *Chat) FindThreadUnique(threadID string) (*db.ThreadModel, error)
- func (c *Chat) GetThread(threadID string) (*db.ThreadModel, error)
- func (c *Chat) InitChat() (string, error)
- func (c *Chat) PersistChat(chat, response, threadID string) (*db.ChatModel, error)
- func (c *Chat) PersistThread(threadID string) (*db.ThreadModel, error)
- type Option
Constants ¶
View Source
const ( DEFAULT_SQL_TIMEOUT = 5 * time.Second DEFAULT_MAX_RESULTS = 1000 DEFAULT_LANGUAGE = "en" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chat ¶
type Chat struct {
Context context.Context
Language string
AIClient ai.IAI
K8SClient *kubernetes.Client
Persist bool
// contains filtered or unexported fields
}
func (*Chat) FetchChatMessages ¶
func (*Chat) FindThreadUnique ¶
func (c *Chat) FindThreadUnique( threadID string, ) (*db.ThreadModel, error)
func (*Chat) PersistChat ¶
func (*Chat) PersistThread ¶
func (c *Chat) PersistThread(threadID string) (*db.ThreadModel, error)
type Option ¶
type Option func(*Chat)
func WithConfigureAssistant ¶
func WithDbClient ¶
func WithDbClient(db *db.PrismaClient) Option
func WithLanguage ¶
func WithPersist ¶
Click to show internal directories.
Click to hide internal directories.