|
pulsatrix 1.1.0
|
One block of a message's content. More...
#include <message.hpp>

Public Types | |
| enum class | Type { Text , ToolUse , ToolResult , Thinking , Opaque } |
Static Public Member Functions | |
| static ContentBlock | Text (std::string text) |
| static ContentBlock | ToolUse (std::string id, std::string name, JsonValue input) |
| static ContentBlock | ToolResult (std::string tool_use_id, std::string content, bool is_error=false) |
Public Attributes | |
| Type | type = Type::Text |
| std::string | text |
| Text, a tool result's content, or thinking. | |
| std::string | id |
| A tool call's id, or for a result the id of the call it answers. | |
| std::string | name |
| A tool call's tool name. | |
| JsonValue | input |
| A tool call's input, a JSON object. | |
| bool | is_error = false |
| Whether a tool result reports a failure. | |
| JsonValue | raw |
| For Thinking and Opaque blocks, the block exactly as the provider sent it, and the provider's name in origin. The provider sends it back unchanged: the Anthropic API rejects a request whose thinking blocks were altered. Other providers skip it. | |
| std::string | origin |
One block of a message's content.
|
strong |
|
static |
|
static |
|
static |
| std::string pulsatrix::orch::ContentBlock::id |
A tool call's id, or for a result the id of the call it answers.
| JsonValue pulsatrix::orch::ContentBlock::input |
A tool call's input, a JSON object.
| bool pulsatrix::orch::ContentBlock::is_error = false |
Whether a tool result reports a failure.
| std::string pulsatrix::orch::ContentBlock::name |
A tool call's tool name.
| std::string pulsatrix::orch::ContentBlock::origin |
| JsonValue pulsatrix::orch::ContentBlock::raw |
For Thinking and Opaque blocks, the block exactly as the provider sent it, and the provider's name in origin. The provider sends it back unchanged: the Anthropic API rejects a request whose thinking blocks were altered. Other providers skip it.
| std::string pulsatrix::orch::ContentBlock::text |
Text, a tool result's content, or thinking.
| Type pulsatrix::orch::ContentBlock::type = Type::Text |