models

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatResponse

type ChatResponse struct {
	Output     string        `json:"output"`
	ToolCalls  []ToolCallLog `json:"tool_calls"`
	RAGUsed    bool          `json:"rag_used"`
	CacheHit   bool          `json:"cache_hit"`
	Latency    int64         `json:"latency_ms"`
	TokensUsed int           `json:"tokens_used"`
	Error      *string       `json:"error,omitempty"`
}

ChatResponse is used here for simplicity as the cache package handles the storage of the final engine output

type KnowledgeChunk

type KnowledgeChunk struct {
	ID        string    `json:"id"`
	Content   string    `json:"content"`
	Category  string    `json:"category"`
	Role      string    `json:"role,omitempty"`
	Files     []string  `json:"files,omitempty"`
	FilesPath string    `json:"files_path,omitempty"`
	Source    string    `json:"source,omitempty"`
	Score     float32   `json:"score,omitempty"`
	Embedding []float32 `json:"-"`
}

KnowledgeChunk represents a piece of information from the knowledge base.

type ToolCallLog

type ToolCallLog struct {
	Name     string        `json:"name"`
	Input    string        `json:"input"`
	Output   string        `json:"output"`
	Duration time.Duration `json:"duration_ms"`
	Success  bool          `json:"success"`
}

ToolCallLog represents a log of a tool execution

Jump to

Keyboard shortcuts

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