Gemini.Types.Live.ToolCall (GeminiEx v0.9.0)

Copy Markdown View Source

Tool call request from the server in Live API sessions.

Request for the client to execute the function calls and return the responses with matching IDs.

Fields

  • function_calls - List of function calls to be executed

Example

%ToolCall{
  function_calls: [
    %{
      "id" => "call_123",
      "name" => "get_weather",
      "args" => %{"location" => "Seattle"}
    }
  ]
}

Summary

Functions

Parses from API response.

Creates a new ToolCall.

Converts to API format (camelCase).

Types

function_call()

@type function_call() :: %{
  optional(:id) => String.t(),
  optional(:name) => String.t(),
  optional(:args) => map()
}

t()

@type t() :: %Gemini.Types.Live.ToolCall{function_calls: [function_call()] | nil}

Functions

from_api(data)

@spec from_api(map() | nil) :: t() | nil

Parses from API response.

new(opts \\ [])

@spec new(keyword()) :: t()

Creates a new ToolCall.

to_api(value)

@spec to_api(t() | nil) :: map() | nil

Converts to API format (camelCase).