Geminix.V1beta.FunctionCall (geminix v0.2.0)

A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name with the arguments and their values.

Fields:

  • :args (map/0) - Optional. The function parameters and values in JSON object format.
  • :id (binary/0) - Optional. The unique id of the function call. If populated, the client to execute the function_call and return the response with the matching id.
  • :name (binary/0) - Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

Summary

Functions

Create a Geminix.V1beta.FunctionCall.t/0 from a map returned by the Gemini API.

Types

t()

@type t() :: %Geminix.V1beta.FunctionCall{
  __meta__: term(),
  args: map(),
  id: binary(),
  name: binary()
}

Functions

from_map(schema \\ %__MODULE__{}, map)

@spec from_map(t(), map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

Create a Geminix.V1beta.FunctionCall.t/0 from a map returned by the Gemini API.

Sometimes, this function should not be applied to the full response body, but instead it should be applied to the correct part of the map in the response body. This depends on the concrete API call.