Documentation
¶
Index ¶
- type OllamaMessage
- type OllamaToolCall
- type Provider
- func (p *Provider) CreateMessage(ctx context.Context, prompt string, messages []llm.Message, tools []llm.Tool) (llm.Message, error)
- func (p *Provider) CreateToolResponse(toolCallID string, content interface{}) (llm.Message, error)
- func (p *Provider) Name() string
- func (p *Provider) SupportsTools() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OllamaMessage ¶
type OllamaMessage struct {
Message api.Message
ToolCallID string // Store tool call ID separately since Ollama API doesn't have this field
}
OllamaMessage adapts Ollama's message format to our Message interface
func (*OllamaMessage) GetContent ¶
func (m *OllamaMessage) GetContent() string
func (*OllamaMessage) GetRole ¶
func (m *OllamaMessage) GetRole() string
func (*OllamaMessage) GetToolCalls ¶
func (m *OllamaMessage) GetToolCalls() []llm.ToolCall
func (*OllamaMessage) GetToolResponseID ¶
func (m *OllamaMessage) GetToolResponseID() string
func (*OllamaMessage) GetUsage ¶
func (m *OllamaMessage) GetUsage() (int, int)
func (*OllamaMessage) IsToolResponse ¶
func (m *OllamaMessage) IsToolResponse() bool
type OllamaToolCall ¶
type OllamaToolCall struct {
// contains filtered or unexported fields
}
OllamaToolCall adapts Ollama's tool call format
func NewOllamaToolCall ¶
func NewOllamaToolCall(call api.ToolCall) *OllamaToolCall
func (*OllamaToolCall) GetArguments ¶
func (t *OllamaToolCall) GetArguments() map[string]interface{}
func (*OllamaToolCall) GetID ¶
func (t *OllamaToolCall) GetID() string
func (*OllamaToolCall) GetName ¶
func (t *OllamaToolCall) GetName() string
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the Provider interface for Ollama
func NewProvider ¶
NewProvider creates a new Ollama provider
func (*Provider) CreateMessage ¶
func (*Provider) CreateToolResponse ¶
func (*Provider) SupportsTools ¶
Click to show internal directories.
Click to hide internal directories.