google

package
v0.0.0-...-28e65b6 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	*genai.Candidate
	// contains filtered or unexported fields
}

func (*Message) GetContent

func (m *Message) GetContent() string

func (*Message) GetRole

func (m *Message) GetRole() string

func (*Message) GetToolCalls

func (m *Message) GetToolCalls() []llm.ToolCall

func (*Message) GetToolResponseID

func (m *Message) GetToolResponseID() string

func (*Message) GetUsage

func (m *Message) GetUsage() (input int, output int)

func (*Message) IsToolResponse

func (m *Message) IsToolResponse() bool

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(ctx context.Context, apiKey, model, systemPrompt string) (*Provider, error)

func (*Provider) CreateMessage

func (p *Provider) CreateMessage(ctx context.Context, prompt string, messages []llm.Message, tools []llm.Tool) (llm.Message, error)

func (*Provider) CreateToolResponse

func (p *Provider) CreateToolResponse(toolCallID string, content any) (llm.Message, error)

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) SupportsTools

func (p *Provider) SupportsTools() bool

type ToolCall

type ToolCall struct {
	genai.FunctionCall
	// contains filtered or unexported fields
}

func (*ToolCall) GetArguments

func (t *ToolCall) GetArguments() map[string]any

func (*ToolCall) GetID

func (t *ToolCall) GetID() string

func (*ToolCall) GetName

func (t *ToolCall) GetName() string

Jump to

Keyboard shortcuts

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