Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChatSession ¶
type ChatSession struct {
// contains filtered or unexported fields
}
ChatSession handles one-shot chat completions for CLI prompts.
func NewChatSession ¶
func NewChatSession(api *server.APIClient, model string, cfg *config.Config, persona *config.Persona, preset *presets.Preset) *ChatSession
NewChatSession creates a new chat session.
func (*ChatSession) Run ¶
func (s *ChatSession) Run(prompt string) error
Run sends the prompt to the model and streams the response.
func (*ChatSession) SetSamplingOptions ¶
func (s *ChatSession) SetSamplingOptions(temp, topP, minP, repeatPenalty, presencePenalty, frequencyPenalty float64, topK, maxTokens int)
SetSamplingOptions sets the sampling parameters for generation.
func (*ChatSession) SetSystemPrompt ¶
func (s *ChatSession) SetSystemPrompt(prompt string)
SetSystemPrompt sets the system prompt for the session.
type ModelInfo ¶
type ModelInfo struct {
User string
Repo string
Quant string
Backend string
Path string
Size int64
LastUsed time.Time
}
ModelInfo represents a locally downloaded model. Backend / Path mirror hf.LocalModel so cmd code can delete by the inventory's authoritative answer rather than re-deriving paths per backend.
Click to show internal directories.
Click to hide internal directories.