View Source ExOpenAI.Components.FunctionTool (ex_openai.ex v2.0.0-beta2)

Defines a function in your own code the model can choose to call. Learn more about function calling.

Fields

  • :defer_loading - optional - boolean()
    Whether this function is deferred and loaded via tool search.

  • :description - optional - String.t() | any()

  • :name - required - String.t()
    The name of the function to call.

  • :parameters - required - map() | any()

  • :strict - required - boolean() | any()

  • :type - required - :function
    The type of the function tool. Always function.
    Allowed values: "function"
    Default: "function"

Summary

Types

@type t() :: %ExOpenAI.Components.FunctionTool{
  defer_loading: boolean() | nil,
  description: (String.t() | any()) | nil,
  name: String.t(),
  parameters: map() | any(),
  strict: boolean() | any(),
  type: :function
}