View Source GptAgent.Types (gpt_agent v6.0.0)
Defines the generic types used throughout the library and provides common validation for those types.
You can use GptAgent.Types
in other modules to import the validation
functions and automatically set up both TypedStruct
and Domo
for your
module.
Summary
Functions
Validates metadata according to OpenAI documentation
Validation for the nonblank_string()
type
Types
@type assistant_id() :: nonblank_string()
@type error(t) :: {:error, t}
@type file_id() :: nonblank_string()
@type message_id() :: nonblank_string()
@type message_metadata() :: %{required(String.t()) => Jason.Encoder.t()}
@type nonblank_string() :: String.t()
@type run_id() :: nonblank_string()
@type success() :: :ok
@type success(t) :: {:ok, t}
@type thread_id() :: nonblank_string()
@type tool_arguments() :: %{required(String.t()) => Jason.Encoder.t()}
@type tool_call_id() :: nonblank_string()
@type tool_name() :: nonblank_string()
@type tool_output() :: nonblank_string()
Functions
@spec validate_message_metadata(message_metadata()) :: result(String.t())
Validates metadata according to OpenAI documentation
Validation for the nonblank_string()
type