Class: Zavudev::Models::Senders::AgentExecution

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/zavudev/models/senders/agent_execution.rb,
sig/zavudev/models/senders/agent_execution.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

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:, agent_id:, cost:, created_at:, input_tokens:, latency_ms:, output_tokens:, status:, error_message: nil, inbound_message_id: nil, knowledge_chunks_used: nil, response_message_id: nil, response_text: nil, tool_calls: nil) ⇒ Object

Some parameter documentations has been truncated, see Zavudev::Models::Senders::AgentExecution for more details.

Parameters:

  • Cost in USD.

  • Status of an agent execution.

  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: nil)

    Knowledge-base chunks retrieved for this answer. Zero on an agent that has docum

  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: nil)

    Tools the agent called while producing this reply. Zero on an agent that has too



# File 'lib/zavudev/models/senders/agent_execution.rb', line 87

Instance Attribute Details

#agent_id ⇒ String

Parameters:

Returns:



15
# File 'lib/zavudev/models/senders/agent_execution.rb', line 15

required :agent_id, String, api_name: :agentId

#cost ⇒ Float

Cost in USD.

Parameters:

Returns:



21
# File 'lib/zavudev/models/senders/agent_execution.rb', line 21

required :cost, Float

#created_at ⇒ Time

Parameters:

Returns:



26
# File 'lib/zavudev/models/senders/agent_execution.rb', line 26

required :created_at, Time, api_name: :createdAt

#error_message ⇒ String?

Parameters:

Returns:



52
# File 'lib/zavudev/models/senders/agent_execution.rb', line 52

optional :error_message, String, api_name: :errorMessage, nil?: true

#id ⇒ String

Parameters:

Returns:



10
# File 'lib/zavudev/models/senders/agent_execution.rb', line 10

required :id, String

#inbound_message_id ⇒ String?

Parameters:

Returns:



57
# File 'lib/zavudev/models/senders/agent_execution.rb', line 57

optional :inbound_message_id, String, api_name: :inboundMessageId

#input_tokens ⇒ Integer

Parameters:

Returns:



31
# File 'lib/zavudev/models/senders/agent_execution.rb', line 31

required :input_tokens, Integer, api_name: :inputTokens

#knowledge_chunks_used ⇒ Integer?

Knowledge-base chunks retrieved for this answer. Zero on an agent that has documents attached means the reply was not grounded in them, which is otherwise indistinguishable from a correct answer in this record. Absent on executions recorded before this field existed, which is not the same as zero.

Parameters:

Returns:



66
# File 'lib/zavudev/models/senders/agent_execution.rb', line 66

optional :knowledge_chunks_used, Integer, api_name: :knowledgeChunksUsed, nil?: true

#latency_ms ⇒ Integer

Parameters:

Returns:



36
# File 'lib/zavudev/models/senders/agent_execution.rb', line 36

required :latency_ms, Integer, api_name: :latencyMs

#output_tokens ⇒ Integer

Parameters:

Returns:



41
# File 'lib/zavudev/models/senders/agent_execution.rb', line 41

required :output_tokens, Integer, api_name: :outputTokens

#response_message_id ⇒ String?

Parameters:

Returns:



71
# File 'lib/zavudev/models/senders/agent_execution.rb', line 71

optional :response_message_id, String, api_name: :responseMessageId, nil?: true

#response_text ⇒ String?

Parameters:

Returns:



76
# File 'lib/zavudev/models/senders/agent_execution.rb', line 76

optional :response_text, String, api_name: :responseText, nil?: true

#status ⇒ Symbol, Zavudev::Models::Senders::AgentExecutionStatus

Status of an agent execution.

Parameters:

Returns:



47
# File 'lib/zavudev/models/senders/agent_execution.rb', line 47

required :status, enum: -> { Zavudev::Senders::AgentExecutionStatus }

#tool_calls ⇒ Integer?

Tools the agent called while producing this reply. Zero on an agent that has tools configured means it answered without calling any — the case where a reply says it will look something up and nothing ever reaches your endpoint. Absent on executions recorded before this field existed, which is not the same as zero.

Parameters:

Returns:



85
# File 'lib/zavudev/models/senders/agent_execution.rb', line 85

optional :tool_calls, Integer, api_name: :toolCalls, nil?: true

Instance Method Details

#to_hash ⇒ {

Returns:



70
# File 'sig/zavudev/models/senders/agent_execution.rbs', line 70

def to_hash: -> {