Documentation
¶
Index ¶
- type CacheControl
- type ContentBlock
- type ExtraContent
- type FunctionCall
- type GeminiProvider
- func (p *GeminiProvider) Chat(ctx context.Context, messages []Message, tools []ToolDefinition, model string, ...) (*LLMResponse, error)
- func (p *GeminiProvider) ChatStream(ctx context.Context, messages []Message, tools []ToolDefinition, model string, ...) (*LLMResponse, error)
- func (p *GeminiProvider) GetDefaultModel() string
- func (p *GeminiProvider) SupportsThinking() bool
- type GoogleExtra
- type HTTPProvider
- func (p *HTTPProvider) Chat(ctx context.Context, messages []Message, tools []ToolDefinition, model string, ...) (*LLMResponse, error)
- func (p *HTTPProvider) ChatStream(ctx context.Context, messages []Message, tools []ToolDefinition, model string, ...) (*LLMResponse, error)
- func (p *HTTPProvider) GetDefaultModel() string
- func (p *HTTPProvider) SupportsNativeSearch() bool
- type LLMProvider
- type LLMResponse
- type Message
- type StreamingProvider
- type ToolCall
- type ToolDefinition
- type ToolFunctionDefinition
- type UsageInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheControl ¶
type CacheControl = protocoltypes.CacheControl
type ContentBlock ¶
type ContentBlock = protocoltypes.ContentBlock
type ExtraContent ¶
type ExtraContent = protocoltypes.ExtraContent
type FunctionCall ¶
type FunctionCall = protocoltypes.FunctionCall
type GeminiProvider ¶
type GeminiProvider struct {
// contains filtered or unexported fields
}
func NewGeminiProvider ¶
func (*GeminiProvider) Chat ¶
func (p *GeminiProvider) Chat( ctx context.Context, messages []Message, tools []ToolDefinition, model string, options map[string]any, ) (*LLMResponse, error)
func (*GeminiProvider) ChatStream ¶
func (p *GeminiProvider) ChatStream( ctx context.Context, messages []Message, tools []ToolDefinition, model string, options map[string]any, onChunk func(accumulated string), ) (*LLMResponse, error)
func (*GeminiProvider) GetDefaultModel ¶
func (p *GeminiProvider) GetDefaultModel() string
func (*GeminiProvider) SupportsThinking ¶
func (p *GeminiProvider) SupportsThinking() bool
type GoogleExtra ¶
type GoogleExtra = protocoltypes.GoogleExtra
type HTTPProvider ¶
type HTTPProvider struct {
// contains filtered or unexported fields
}
func NewHTTPProvider ¶
func NewHTTPProvider(apiKey, apiBase, proxy string) *HTTPProvider
func NewHTTPProviderWithMaxTokensField ¶
func NewHTTPProviderWithMaxTokensField(apiKey, apiBase, proxy, maxTokensField string) *HTTPProvider
func (*HTTPProvider) Chat ¶
func (p *HTTPProvider) Chat( ctx context.Context, messages []Message, tools []ToolDefinition, model string, options map[string]any, ) (*LLMResponse, error)
func (*HTTPProvider) ChatStream ¶
func (p *HTTPProvider) ChatStream( ctx context.Context, messages []Message, tools []ToolDefinition, model string, options map[string]any, onChunk func(accumulated string), ) (*LLMResponse, error)
ChatStream implements providers.StreamingProvider by delegating to the OpenAI-compatible streaming endpoint (SSE with stream: true).
func (*HTTPProvider) GetDefaultModel ¶
func (p *HTTPProvider) GetDefaultModel() string
func (*HTTPProvider) SupportsNativeSearch ¶
func (p *HTTPProvider) SupportsNativeSearch() bool
type LLMProvider ¶
type LLMProvider interface {
Chat(
ctx context.Context,
messages []Message,
tools []ToolDefinition,
model string,
options map[string]any,
) (*LLMResponse, error)
GetDefaultModel() string
}
type LLMResponse ¶
type LLMResponse = protocoltypes.LLMResponse
type Message ¶
type Message = protocoltypes.Message
type StreamingProvider ¶
type StreamingProvider interface {
ChatStream(
ctx context.Context,
messages []Message,
tools []ToolDefinition,
model string,
options map[string]any,
onChunk func(accumulated string),
) (*LLMResponse, error)
}
type ToolCall ¶
type ToolCall = protocoltypes.ToolCall
type ToolDefinition ¶
type ToolDefinition = protocoltypes.ToolDefinition
type ToolFunctionDefinition ¶
type ToolFunctionDefinition = protocoltypes.ToolFunctionDefinition
type UsageInfo ¶
type UsageInfo = protocoltypes.UsageInfo
Click to show internal directories.
Click to hide internal directories.