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

A custom tool that processes input using a specified format.

Fields

  • :custom - required - {:%{}, [], [{{:optional, [], [:description]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:optional, [], [:format]}, {:|, [], [{:%{}, [], [{{:required, [], [:type]}, :text}]}, {:%{}, [], [{{:required, [], [:grammar]}, {:%{}, [], [{{:required, [], [:definition]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:required, [], [:syntax]}, {:|, [], [:lark, :regex]}}]}}, {{:required, [], [:type]}, :grammar}]}]}}, {{:required, [], [:name]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}]}
    Properties of the custom tool.

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

Summary

Types

@type t() :: %ExOpenAI.Components.CustomToolChatCompletions{
  custom: %{
    optional(:description) => String.t(),
    optional(:format) =>
      %{type: :text}
      | %{
          grammar: %{definition: String.t(), syntax: :lark | :regex},
          type: :grammar
        },
    name: String.t()
  },
  type: :custom
}