Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Model string
MaxResults int // top-K messages to include (default: 20)
MaxBodyLen int // truncate body per message (default: 2000 chars)
}
Config holds chat session configuration.
type LLMClient ¶
type LLMClient interface {
// ChatStream sends messages and streams response tokens via callback.
ChatStream(ctx context.Context, messages []Message, onToken func(string)) error
// Chat sends messages and returns the complete response.
Chat(ctx context.Context, messages []Message) (string, error)
}
LLMClient abstracts LLM providers for swappability.
type OllamaClient ¶
type OllamaClient struct {
// contains filtered or unexported fields
}
OllamaClient implements LLMClient using the Ollama API.
func NewOllamaClient ¶
func NewOllamaClient(serverURL, model string) (*OllamaClient, error)
NewOllamaClient creates an OllamaClient for the given server and model.
func (*OllamaClient) ChatStream ¶
type RetrievedMessage ¶
type RetrievedMessage struct {
ID int64
From string
To string
Date string
Subject string
Labels string
Body string
}
RetrievedMessage holds a message formatted for context injection.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session manages a chat conversation with RAG over the email archive.
func NewSession ¶
NewSession creates a new chat session.
Click to show internal directories.
Click to hide internal directories.