Class: Anthropic::Models::Beta::BetaManagedAgentsUserToolResultEvent
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::BetaManagedAgentsUserToolResultEvent
- Defined in:
- lib/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rb,
sig/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rbs
Defined Under Namespace
Modules: Content
Instance Attribute Summary collapse
-
#content ⇒ Array<Anthropic::Models::Beta::Sessions::BetaManagedAgentsTextBlock, Anthropic::Models::Beta::Sessions::BetaManagedAgentsImageBlock, Anthropic::Models::Beta::Sessions::BetaManagedAgentsDocumentBlock, Anthropic::Models::Beta::Sessions::BetaManagedAgentsSearchResultBlock>?
The result content returned by the tool.
-
#id ⇒ String
Unique identifier for this event.
-
#is_error ⇒ Boolean?
Whether the tool execution resulted in an error.
-
#processed_at ⇒ Time?
Timestamp when this result was processed.
-
#session_thread_id ⇒ String?
Set by the server to the subagent thread this result was routed to.
-
#tool_use_id ⇒ String
The id of the
agent.tool_useevent this result corresponds to, which can be found in the lastsession.status_idleevent'sstop_reason.event_idsfield. - #type ⇒ Symbol, :"user.tool_result"
Instance Method Summary collapse
-
#initialize(id:, tool_use_id:, content: nil, is_error: nil, processed_at: nil, session_thread_id: nil, type: :"user.tool_result") ⇒ BetaManagedAgentsUserToolResultEvent
constructor
Event sent by the client providing the result of an agent-toolset tool execution.
- #to_hash ⇒ { id: String, tool_use_id: String, type: :"user.tool_result", content: ::Array[Anthropic::Models::Beta::BetaManagedAgentsUserToolResultEvent::content], is_error: bool?, processed_at: Time?, session_thread_id: String? }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, tool_use_id:, content: nil, is_error: nil, processed_at: nil, session_thread_id: nil, type: :"user.tool_result") ⇒ BetaManagedAgentsUserToolResultEvent
Event sent by the client providing the result of an agent-toolset tool
execution. Only valid on self_hosted environments, where sandbox-routed tools
are executed by the client rather than the server.
Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaManagedAgentsUserToolResultEvent for more details.
|
|
# File 'lib/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rb', line 53
|
Instance Attribute Details
#content ⇒ Array<Anthropic::Models::Beta::Sessions::BetaManagedAgentsTextBlock, Anthropic::Models::Beta::Sessions::BetaManagedAgentsImageBlock, Anthropic::Models::Beta::Sessions::BetaManagedAgentsDocumentBlock, Anthropic::Models::Beta::Sessions::BetaManagedAgentsSearchResultBlock>?
The result content returned by the tool.
31 32 |
# File 'lib/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rb', line 31 optional :content, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaManagedAgentsUserToolResultEvent::Content] } |
#id ⇒ String
Unique identifier for this event.
11 |
# File 'lib/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rb', line 11 required :id, String |
#is_error ⇒ Boolean?
Whether the tool execution resulted in an error.
38 |
# File 'lib/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rb', line 38 optional :is_error, Anthropic::Internal::Type::Boolean, nil?: true |
#processed_at ⇒ Time?
Timestamp when this result was processed.
44 |
# File 'lib/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rb', line 44 optional :processed_at, Time, nil?: true |
#session_thread_id ⇒ String?
Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.
51 |
# File 'lib/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rb', line 51 optional :session_thread_id, String, nil?: true |
#tool_use_id ⇒ String
The id of the agent.tool_use event this result corresponds to, which can be
found in the last session.status_idle
event's
stop_reason.event_ids field.
20 |
# File 'lib/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rb', line 20 required :tool_use_id, String |
#type ⇒ Symbol, :"user.tool_result"
25 |
# File 'lib/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rb', line 25 required :type, const: :"user.tool_result" |
Instance Method Details
#to_hash ⇒ { id: String, tool_use_id: String, type: :"user.tool_result", content: ::Array[Anthropic::Models::Beta::BetaManagedAgentsUserToolResultEvent::content], is_error: bool?, processed_at: Time?, session_thread_id: String? }
46 47 48 49 50 51 52 53 54 |
# File 'sig/anthropic/models/beta/beta_managed_agents_user_tool_result_event.rbs', line 46
def to_hash: -> {
id: String,
tool_use_id: String,
type: :"user.tool_result",
content: ::Array[Anthropic::Models::Beta::BetaManagedAgentsUserToolResultEvent::content],
is_error: bool?,
processed_at: Time?,
session_thread_id: String?
}
|