nxt::ai::agent namespace

Classes

struct output_item_result
Result of consuming one output item from the event stream.
class response_continuation
struct response_stream_result
Summary gathered while consuming one Responses stream.

Functions

void append_stateless_turn(nlohmann::json& input, std::vector<nlohmann::json> output_items, std::vector<nlohmann::json> tool_outputs)
Append model output items followed by tool outputs to a stateless input.
auto is_event(const responses::stream_event& event, std::string_view type) →  bool
Test whether an SSE event has the requested Responses event type.
auto output_item_from_event(const responses::stream_event& event) →  std::optional<nlohmann::json>
Extract the event payload's item object when present.
auto output_item_type(const responses::stream_event& event) →  std::string
Return the output item type carried by an event, or an empty string.
void prepare_tool_request(responses::openai_responses_request& request, const std::vector<tools::function_tool>& tool_list)
Attach tool definitions and stateless-continuation includes to a request.
void request_encrypted_reasoning(responses::openai_responses_request& request)
Ask Responses to include encrypted reasoning content in output items.

Function documentation

void nxt::ai::agent::append_stateless_turn(nlohmann::json& input, std::vector<nlohmann::json> output_items, std::vector<nlohmann::json> tool_outputs)

Append model output items followed by tool outputs to a stateless input.

bool nxt::ai::agent::is_event(const responses::stream_event& event, std::string_view type)

Test whether an SSE event has the requested Responses event type.

std::optional<nlohmann::json> nxt::ai::agent::output_item_from_event(const responses::stream_event& event)

Extract the event payload's item object when present.

std::string nxt::ai::agent::output_item_type(const responses::stream_event& event)

Return the output item type carried by an event, or an empty string.

void nxt::ai::agent::prepare_tool_request(responses::openai_responses_request& request, const std::vector<tools::function_tool>& tool_list)

Attach tool definitions and stateless-continuation includes to a request.

void nxt::ai::agent::request_encrypted_reasoning(responses::openai_responses_request& request)

Ask Responses to include encrypted reasoning content in output items.