Documentation
¶
Overview ¶
Package gemini implements providers.ModelProvider against the Gemini API (generateContent with native function calling). It maps RunLore's engine- agnostic exchange (OpenAI-shaped: assistant tool_calls + separate tool messages) onto Gemini's contents/parts form: assistant turns become role "model" with functionCall parts, and tool results coalesce into one role "user" turn of functionResponse parts. Each call/response carries the originating call id, so parallel calls to the same function name correlate by id (Gemini's rule for parallel calls); when the model returns no id, correlation falls back to name.
Index ¶
Constants ¶
const DefaultBaseURL = "https://generativelanguage.googleapis.com"
DefaultBaseURL is the public Gemini API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Gemini (generateContent) model provider.
func (*Client) Complete ¶
func (c *Client) Complete(ctx context.Context, req providers.CompletionRequest) (providers.CompletionResponse, error)
Complete sends a generateContent request with tools and maps the result back.