Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClaudeCliProvider ¶ added in v0.1.1
type ClaudeCliProvider struct {
// contains filtered or unexported fields
}
ClaudeCliProvider implements LLMProvider using the claude CLI as a subprocess.
func NewClaudeCliProvider ¶ added in v0.1.1
func NewClaudeCliProvider(workspace string) *ClaudeCliProvider
NewClaudeCliProvider creates a new Claude CLI provider.
func (*ClaudeCliProvider) Chat ¶ added in v0.1.1
func (p *ClaudeCliProvider) Chat(ctx context.Context, messages []Message, tools []ToolDefinition, model string, options map[string]interface{}) (*LLMResponse, error)
Chat implements LLMProvider.Chat by executing the claude CLI.
func (*ClaudeCliProvider) GetDefaultModel ¶ added in v0.1.1
func (p *ClaudeCliProvider) GetDefaultModel() string
GetDefaultModel returns the default model identifier.
type ClaudeProvider ¶ added in v0.1.1
type ClaudeProvider struct {
// contains filtered or unexported fields
}
func NewClaudeProvider ¶ added in v0.1.1
func NewClaudeProvider(token string) *ClaudeProvider
func NewClaudeProviderWithTokenSource ¶ added in v0.1.1
func NewClaudeProviderWithTokenSource(token string, tokenSource func() (string, error)) *ClaudeProvider
func (*ClaudeProvider) Chat ¶ added in v0.1.1
func (p *ClaudeProvider) Chat(ctx context.Context, messages []Message, tools []ToolDefinition, model string, options map[string]interface{}) (*LLMResponse, error)
func (*ClaudeProvider) GetDefaultModel ¶ added in v0.1.1
func (p *ClaudeProvider) GetDefaultModel() string
type CodexProvider ¶ added in v0.1.1
type CodexProvider struct {
// contains filtered or unexported fields
}
func NewCodexProvider ¶ added in v0.1.1
func NewCodexProvider(token, accountID string) *CodexProvider
func NewCodexProviderWithTokenSource ¶ added in v0.1.1
func NewCodexProviderWithTokenSource(token, accountID string, tokenSource func() (string, string, error)) *CodexProvider
func (*CodexProvider) Chat ¶ added in v0.1.1
func (p *CodexProvider) Chat(ctx context.Context, messages []Message, tools []ToolDefinition, model string, options map[string]interface{}) (*LLMResponse, error)
func (*CodexProvider) GetDefaultModel ¶ added in v0.1.1
func (p *CodexProvider) GetDefaultModel() string
type FunctionCall ¶
type HTTPProvider ¶
type HTTPProvider struct {
// contains filtered or unexported fields
}
func NewHTTPProvider ¶
func NewHTTPProvider(apiKey, apiBase, proxy string) *HTTPProvider
func (*HTTPProvider) Chat ¶
func (p *HTTPProvider) Chat(ctx context.Context, messages []Message, tools []ToolDefinition, model string, options map[string]interface{}) (*LLMResponse, error)
func (*HTTPProvider) GetDefaultModel ¶
func (p *HTTPProvider) GetDefaultModel() string
type LLMProvider ¶
type LLMProvider interface {
Chat(ctx context.Context, messages []Message, tools []ToolDefinition, model string, options map[string]interface{}) (*LLMResponse, error)
GetDefaultModel() string
}
func CreateProvider ¶
func CreateProvider(cfg *config.Config) (LLMProvider, error)
type LLMResponse ¶
type ToolCall ¶
type ToolCall struct {
ID string `json:"id"`
Type string `json:"type,omitempty"`
Function *FunctionCall `json:"function,omitempty"`
Name string `json:"name,omitempty"`
Arguments map[string]interface{} `json:"arguments,omitempty"`
}
type ToolDefinition ¶
type ToolDefinition struct {
Type string `json:"type"`
Function ToolFunctionDefinition `json:"function"`
}
type ToolFunctionDefinition ¶
Click to show internal directories.
Click to hide internal directories.