cmd

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL