Class: Cerca::Models::Thread

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cerca/models/thread.rb

Overview

Defined Under Namespace

Modules: ExternalToolNamespaces, LastTurnStatus

Instance Attribute Summary collapse

Class Method 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:, compiled_context:, completed_at:, created_at:, depth:, error:, instructions:, last_turn_status:, message:, messages:, model:, parent_thread_id:, result:, schedule_id:, schedule_seq:, status:, sub_threads:, tools:, turns:, updated_at:, external_tool_namespaces: nil) ⇒ Object

Some parameter documentations has been truncated, see Cerca::Models::Thread for more details.

Parameters:



# File 'lib/cerca/models/thread.rb', line 127

Instance Attribute Details

#agent_idString

Returns:

  • (String)


15
# File 'lib/cerca/models/thread.rb', line 15

required :agent_id, String, api_name: :agentId

#compiled_contextCerca::Models::CompiledContext?



20
# File 'lib/cerca/models/thread.rb', line 20

required :compiled_context, -> { Cerca::CompiledContext }, api_name: :compiledContext, nil?: true

#completed_atString?

Returns:

  • (String, nil)


25
# File 'lib/cerca/models/thread.rb', line 25

required :completed_at, String, api_name: :completedAt, nil?: true

#created_atString

Returns:

  • (String)


30
# File 'lib/cerca/models/thread.rb', line 30

required :created_at, String, api_name: :createdAt

#depthFloat

Returns:

  • (Float)


35
# File 'lib/cerca/models/thread.rb', line 35

required :depth, Float

#errorString?

Returns:

  • (String, nil)


40
# File 'lib/cerca/models/thread.rb', line 40

required :error, String, nil?: true

#external_tool_namespacesSymbol, ...

Returns:

  • (Symbol, :all, Array<String>, nil)


123
124
125
# File 'lib/cerca/models/thread.rb', line 123

optional :external_tool_namespaces,
union: -> { Cerca::Thread::ExternalToolNamespaces },
api_name: :externalToolNamespaces

#idString

Returns:

  • (String)


10
# File 'lib/cerca/models/thread.rb', line 10

required :id, String

#instructionsString?

Returns:

  • (String, nil)


45
# File 'lib/cerca/models/thread.rb', line 45

required :instructions, String, nil?: true

#last_turn_statusSymbol, ...

Returns:



50
51
52
53
# File 'lib/cerca/models/thread.rb', line 50

required :last_turn_status,
enum: -> { Cerca::Thread::LastTurnStatus },
api_name: :lastTurnStatus,
nil?: true

#messageString

Returns:

  • (String)


58
# File 'lib/cerca/models/thread.rb', line 58

required :message, String

#messagesArray<Cerca::Models::Message>

Returns:



63
# File 'lib/cerca/models/thread.rb', line 63

required :messages, -> { Cerca::Internal::Type::ArrayOf[Cerca::Message] }

#modelString

Returns:

  • (String)


68
# File 'lib/cerca/models/thread.rb', line 68

required :model, String

#parent_thread_idString?

Returns:

  • (String, nil)


73
# File 'lib/cerca/models/thread.rb', line 73

required :parent_thread_id, String, api_name: :parentThreadId, nil?: true

#resultString?

Returns:

  • (String, nil)


78
# File 'lib/cerca/models/thread.rb', line 78

required :result, String, nil?: true

#schedule_idString?

Returns:

  • (String, nil)


83
# File 'lib/cerca/models/thread.rb', line 83

required :schedule_id, String, api_name: :scheduleId, nil?: true

#schedule_seqFloat?

Returns:

  • (Float, nil)


88
# File 'lib/cerca/models/thread.rb', line 88

required :schedule_seq, Float, api_name: :scheduleSeq, nil?: true

#statusSymbol, Cerca::Models::Status

‘idle` threads can accept a new turn or be closed. `running` threads have an active turn. `awaiting` threads are paused on external input such as approvals. `closed` threads are terminal.

Returns:



96
# File 'lib/cerca/models/thread.rb', line 96

required :status, enum: -> { Cerca::Status }

#sub_threadsArray<Cerca::Models::SubThreadSummary>



101
102
103
# File 'lib/cerca/models/thread.rb', line 101

required :sub_threads,
-> { Cerca::Internal::Type::ArrayOf[Cerca::SubThreadSummary] },
api_name: :subThreads

#toolsArray<Symbol, Cerca::Models::ToolName>

Returns:



108
# File 'lib/cerca/models/thread.rb', line 108

required :tools, -> { Cerca::Internal::Type::ArrayOf[enum: Cerca::ToolName] }

#turnsArray<Cerca::Models::Turn>

Returns:



113
# File 'lib/cerca/models/thread.rb', line 113

required :turns, -> { Cerca::Internal::Type::ArrayOf[Cerca::Turn] }

#updated_atString

Returns:

  • (String)


118
# File 'lib/cerca/models/thread.rb', line 118

required :updated_at, String, api_name: :updatedAt

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/cerca/models/thread.rb', line 182