Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conversation ¶
type Conversation interface { GetID() string GetCreatedAt() time.Time GetMessages() []Message RemoveMessage(id uuid.UUID) AddMessage(message Message) WithPrompt(prompt prompts.Prompt) Reset() Conversation }
func NewStackedConversation ¶
func NewStackedConversation( repo Repository, ) Conversation
type Message ¶
type Message struct { ID uuid.UUID `json:"id"` Role Role `json:"role"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` IsFile bool `json:"is_file"` }
func NewFileMessage ¶
func NewMessage ¶
type Repository ¶
type Repository interface { SaveConversation(conversation Conversation) error LoadConversation(id string) (Conversation, error) DeleteConversation(id string) error GetConversations() ([]Conversation, error) Close() error }
func NewSQLiteRepository ¶
func NewSQLiteRepository(dbPath string) (Repository, error)
Click to show internal directories.
Click to hide internal directories.