View Source GptAgent behaviour (gpt_agent v3.2.1)
Provides a GPT conversation agent
Summary
Functions
Acts as a "flag" to mark this module as a Knigge module.
Access Knigge internal values, such as the implementation being delegated to etc.
Returns a specification to start this module under a supervisor.
See GptAgent.Impl.start_link/1
.
Types
@type assistant_id() :: binary()
@type connect_opt() :: {:subscribe, boolean()} | {:thread_id, thread_id()} | {:assistant_id, assistant_id()}
@type connect_opts() :: [connect_opt()]
@type t() :: %GptAgent{ default_assistant_id: binary() | nil, last_message_id: (binary() | nil) | nil, run_id: (binary() | nil) | nil, running?: boolean(), thread_id: (binary() | nil) | nil, timeout_ms: non_neg_integer(), tool_calls: [GptAgent.Events.ToolCallRequested.t()], tool_outputs: [GptAgent.Events.ToolCallOutputRecorded.t()] }
@type thread_id() :: binary()
Callbacks
@callback connect(connect_opts()) :: {:ok, pid()} | {:error, :invalid_thread_id}
@callback create_thread() :: {:ok, binary()}
@callback shutdown(pid()) :: :ok
Functions
@spec __knigge__() :: :ok
Acts as a "flag" to mark this module as a Knigge module.
@spec __knigge__(:behaviour) :: module()
@spec __knigge__(:implementation) :: module()
@spec __knigge__(:options) :: Knigge.Options.t()
Access Knigge internal values, such as the implementation being delegated to etc.
Returns a specification to start this module under a supervisor.
See Supervisor
.
See GptAgent.Impl.start_link/1
.