Documentation
¶
Index ¶
- type BlockContent
- type ChatResponsedeprecated
- type Config
- type EmbeddingConfig
- type EmbeddingService
- type FunctionCalldeprecated
- type IntentClassifierConfig
- type LLMCallStatsdeprecated
- type LLMConfig
- type LLMServicedeprecated
- type Messagedeprecated
- type RerankResult
- type RerankerConfig
- type RerankerService
- type TitleGenerator
- type TitleGeneratorConfig
- type ToolCalldeprecated
- type ToolDescriptordeprecated
- type UniversalParrotConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockContent ¶ added in v0.94.0
BlockContent represents a simplified block for title generation.
type ChatResponse
deprecated
type ChatResponse = llm.ChatResponse
ChatResponse represents the LLM response including potential tool calls.
Deprecated: Use llm.ChatResponse directly.
type Config ¶
type Config struct {
Embedding EmbeddingConfig
Reranker RerankerConfig
IntentClassifier IntentClassifierConfig
LLM LLMConfig
UniversalParrot UniversalParrotConfig // Phase 2: Configuration-driven parrots
Enabled bool
}
Config represents AI configuration.
func NewConfigFromProfile ¶
NewConfigFromProfile creates AI config from profile.
type EmbeddingConfig ¶
type EmbeddingConfig struct {
Provider string
Model string
APIKey string
BaseURL string
Dimensions int
}
EmbeddingConfig represents vector embedding configuration.
type EmbeddingService ¶
type EmbeddingService interface {
// Embed generates vector for a single text.
Embed(ctx context.Context, text string) ([]float32, error)
// EmbedBatch generates vectors for multiple texts.
EmbedBatch(ctx context.Context, texts []string) ([][]float32, error)
// Dimensions returns the vector dimension.
Dimensions() int
}
EmbeddingService is the vector embedding service interface.
func NewEmbeddingService ¶
func NewEmbeddingService(cfg *EmbeddingConfig) (EmbeddingService, error)
NewEmbeddingService creates a new EmbeddingService.
Phase 1 Note: This is a bridge compatibility layer that maintains the original API. The actual embedding functionality has been moved to ai/core/embedding/provider.go. Future refactoring will deprecate this file in favor of the core package.
type FunctionCall
deprecated
type FunctionCall = llm.FunctionCall
FunctionCall represents the function details.
Deprecated: Use llm.FunctionCall directly.
type IntentClassifierConfig ¶
IntentClassifierConfig represents intent classification LLM configuration. Uses a lightweight model for fast, cost-effective classification.
type LLMCallStats
deprecated
added in
v0.94.0
type LLMCallStats = llm.LLMCallStats
LLMCallStats represents statistics for a single LLM call.
Deprecated: Use llm.LLMCallStats directly.
type LLMConfig ¶
type LLMConfig struct {
Provider string // Provider identifier for logging/future extension: zai, deepseek, openai, ollama
Model string // Model name: glm-4.7, deepseek-chat, gpt-4o, etc.
APIKey string
BaseURL string
MaxTokens int // default: 2048
Temperature float32 // default: 0.7
}
LLMConfig represents LLM configuration.
type LLMService
deprecated
LLMService is the LLM service interface.
Deprecated: Use llm.Service directly.
func NewLLMService ¶
func NewLLMService(cfg *LLMConfig) (LLMService, error)
NewLLMService creates a new LLMService.
Phase 1 Note: This is a bridge compatibility layer that maintains the original API. The actual LLM functionality has been moved to ai/core/llm/service.go.
type Message
deprecated
Message represents a chat message.
Deprecated: Use llm.Message directly.
func AssistantMessage
deprecated
func FormatMessages
deprecated
func SystemPrompt
deprecated
func UserMessage
deprecated
type RerankResult ¶
RerankResult represents a reranking result. Deprecated: Use reranker.Result directly.
type RerankerConfig ¶
type RerankerConfig struct {
Provider string
Model string
APIKey string
BaseURL string
Enabled bool
}
RerankerConfig represents reranker configuration.
type RerankerService ¶
RerankerService is the reranking service interface. Deprecated: Use reranker.Service directly.
func NewRerankerService ¶
func NewRerankerService(cfg *RerankerConfig) RerankerService
NewRerankerService creates a new RerankerService.
Phase 1 Note: This is a bridge compatibility layer that maintains the original API. The actual reranker functionality has been moved to ai/core/reranker/service.go.
type TitleGenerator ¶ added in v0.94.0
type TitleGenerator struct {
// contains filtered or unexported fields
}
TitleGenerator generates meaningful titles for AI conversations.
func NewTitleGenerator ¶ added in v0.94.0
func NewTitleGenerator(cfg TitleGeneratorConfig) *TitleGenerator
NewTitleGenerator creates a new title generator instance.
func (*TitleGenerator) Generate ¶ added in v0.94.0
func (tg *TitleGenerator) Generate(ctx context.Context, userMessage, aiResponse string) (string, error)
Generate generates a title based on the conversation content.
func (*TitleGenerator) GenerateTitleFromBlocks ¶ added in v0.94.0
func (tg *TitleGenerator) GenerateTitleFromBlocks(ctx context.Context, blocks []BlockContent) (string, error)
GenerateTitleFromBlocks generates a title from a slice of blocks.
type TitleGeneratorConfig ¶ added in v0.94.0
TitleGeneratorConfig holds configuration for the title generator.
type ToolDescriptor
deprecated
type ToolDescriptor = llm.ToolDescriptor
ToolDescriptor represents a function/tool available to the LLM.
Deprecated: Use llm.ToolDescriptor directly.
type UniversalParrotConfig ¶ added in v0.94.0
type UniversalParrotConfig struct {
Enabled bool // Enable UniversalParrot for creating parrots from YAML configs
ConfigDir string // Path to parrot YAML configs (default: ./config/parrots)
FallbackMode string // "legacy" | "error" when config load fails (default: legacy)
}
UniversalParrotConfig represents configuration for UniversalParrot (configuration-driven parrots).
Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent provides conversation context management for multi-turn dialogues.
|
Package agent provides conversation context management for multi-turn dialogues. |
|
orchestrator
Package orchestrator implements the Orchestrator-Workers pattern for multi-agent coordination.
|
Package orchestrator implements the Orchestrator-Workers pattern for multi-agent coordination. |
|
registry
Package registry provides metrics collection for UniversalParrot.
|
Package registry provides metrics collection for UniversalParrot. |
|
tools
Package tools provides tool-level result caching for AI agents.
|
Package tools provides tool-level result caching for AI agents. |
|
universal
Package universal provides configuration loading for UniversalParrot.
|
Package universal provides configuration loading for UniversalParrot. |
|
Package aitime provides the time parsing service interface for AI agents.
|
Package aitime provides the time parsing service interface for AI agents. |
|
Package cache provides the cache service interface for AI agents.
|
Package cache provides the cache service interface for AI agents. |
|
Package context provides context building for LLM prompts.
|
Package context provides context building for LLM prompts. |
|
core
|
|
|
Package duplicate provides memo duplicate detection for P2-C002.
|
Package duplicate provides memo duplicate detection for P2-C002. |
|
Package graph - builder implementation for P3-C001.
|
Package graph - builder implementation for P3-C001. |
|
observability
|
|
|
logging
Package logging provides structured logging utilities for AI modules.
|
Package logging provides structured logging utilities for AI modules. |
|
metrics
Package metrics provides the evaluation metrics service interface for AI agents.
|
Package metrics provides the evaluation metrics service interface for AI agents. |
|
tracing
Package tracing provides distributed tracing instrumentation for AI modules.
|
Package tracing provides distributed tracing instrumentation for AI modules. |
|
Package review provides intelligent memo review system based on spaced repetition.
|
Package review provides intelligent memo review system based on spaced repetition. |
|
Package routing provides routing result caching for performance optimization.
|
Package routing provides routing result caching for performance optimization. |
|
services
|
|
|
schedule
Package schedule provides schedule-related AI agent utilities.
|
Package schedule provides schedule-related AI agent utilities. |
|
session
Package session provides the session persistence service interface for AI agents.
|
Package session provides the session persistence service interface for AI agents. |
|
stats
Package stats provides cost alerting for agent sessions.
|
Package stats provides cost alerting for agent sessions. |
|
Package tags provides intelligent tag suggestion for memos.
|
Package tags provides intelligent tag suggestion for memos. |
|
Package timeout defines centralized timeout constants for AI operations.
|
Package timeout defines centralized timeout constants for AI operations. |