Jido.AI.Actions.OpenaiEx.ResponseRetrieve (Jido AI v0.5.2)
View SourceSummary
Functions
Callback implementation for Jido.Action.on_after_run/1
.
Callback implementation for Jido.Action.on_after_validate_params/1
.
Callback implementation for Jido.Action.on_before_validate_params/1
.
Callback implementation for Jido.Action.on_error/4
.
Retrieves an asynchronous response using OpenAI Responses API.
Validates the input parameters for the Action.
Functions
Callback implementation for Jido.Action.on_after_run/1
.
Callback implementation for Jido.Action.on_after_validate_params/1
.
Callback implementation for Jido.Action.on_before_validate_params/1
.
Callback implementation for Jido.Action.on_error/4
.
Retrieves an asynchronous response using OpenAI Responses API.
Parameters
- params: Map containing:
- model: Either a %Jido.AI.Model{} struct or a tuple of {provider, opts}
- response_id: The ID of the response to retrieve
- context: The action context containing state and other information
Returns
- {:ok, %{ id: response_id, model: model_name, content: response_content, tool_results: [optional_tool_results], status: "completed" | "processing" | "error", created_at: timestamp }} on success
- on failure
Validates the input parameters for the Action.
Examples
iex> defmodule ExampleAction do
...> use Jido.Action,
...> name: "example_action",
...> schema: [
...> input: [type: :string, required: true]
...> ]
...> end
...> ExampleAction.validate_params(%{input: "test"})
{:ok, %{input: "test"}}
iex> ExampleAction.validate_params(%{})
{:error, "Invalid parameters for Action: Required key :input not found"}