Class: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb,
sig/openai/models/beta/chatkit/chatkit_thread_item_list.rbs

Defined Under Namespace

Modules: Status

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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:, arguments:, call_id:, created_at:, name:, output:, status:, thread_id:, object: :"chatkit.thread_item", type: :"chatkit.client_tool_call") ⇒ ChatKitClientToolCall

Returns a new instance of ChatKitClientToolCall.

Parameters:

  • id —

    Identifier of the thread item.

  • arguments —

    JSON-encoded arguments that were sent to the tool.

  • call_id —

    Identifier for the client tool call.

  • created_at —

    Unix timestamp (in seconds) for when the item was created.

  • name —

    Tool name that was invoked.

  • output —

    JSON-encoded output captured from the tool. Defaults to null while execution is in progress.

  • status —

    Execution status for the tool call.

  • thread_id —

    Identifier of the parent thread.

  • object (defaults to: :"chatkit.thread_item") —

    Type discriminator that is always chatkit.thread_item.

  • type (defaults to: :"chatkit.client_tool_call") —

    Type discriminator that is always chatkit.client_tool_call.

  • id: (String)
  • arguments: (String)
  • call_id: (String)
  • created_at: (Integer)
  • name: (String)
  • output: (String, nil)
  • status: (OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::status)
  • thread_id: (String)
  • object: (:"chatkit.thread_item") (defaults to: :"chatkit.thread_item")
  • type: (:"chatkit.client_tool_call") (defaults to: :"chatkit.client_tool_call")


# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 151

Instance Attribute Details

#arguments ⇒ String

JSON-encoded arguments that were sent to the tool.

Returns:

  • (String)


97
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 97

required :arguments, String

#call_id ⇒ String

Identifier for the client tool call.

Returns:

  • (String)


103
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 103

required :call_id, String

#created_at ⇒ Integer

Unix timestamp (in seconds) for when the item was created.

Returns:

  • (Integer)


109
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 109

required :created_at, Integer

#id ⇒ String

Identifier of the thread item.

Returns:

  • (String)


91
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 91

required :id, String

#name ⇒ String

Tool name that was invoked.

Returns:

  • (String)


115
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 115

required :name, String

#object ⇒ :"chatkit.thread_item"

Type discriminator that is always chatkit.thread_item.

Returns:

  • (:"chatkit.thread_item")


121
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 121

required :object, const: :"chatkit.thread_item"

#output ⇒ String?

JSON-encoded output captured from the tool. Defaults to null while execution is in progress.

Returns:

  • (String, nil)


128
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 128

required :output, String, nil?: true

#status ⇒ OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::status

Execution status for the tool call.

Returns:

  • (OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::status)


134
135
136
137
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 134

required(
  :status,
  enum: -> { OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::Status }
)

#thread_id ⇒ String

Identifier of the parent thread.

Returns:

  • (String)


143
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 143

required :thread_id, String

#type ⇒ :"chatkit.client_tool_call"

Type discriminator that is always chatkit.client_tool_call.

Returns:

  • (:"chatkit.client_tool_call")


149
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 149

required :type, const: :"chatkit.client_tool_call"

Instance Method Details

#to_hash ⇒ { id: String, arguments: String, call_id: String, created_at: Integer, name: String, ?object: :"chatkit.thread_item", output: String?, status: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::status, thread_id: String, ?type: :"chatkit.client_tool_call" }

Returns:

  • ({ id: String, arguments: String, call_id: String, created_at: Integer, name: String, ?object: :"chatkit.thread_item", output: String?, status: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::status, thread_id: String, ?type: :"chatkit.client_tool_call" })


149
150
151
152
153
154
155
156
157
158
159
160
# File 'sig/openai/models/beta/chatkit/chatkit_thread_item_list.rbs', line 149

def to_hash: -> {
  id: String,
  arguments: String,
  call_id: String,
  created_at: Integer,
  name: String,
  ?object: :"chatkit.thread_item",
  output: String?,
  status: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::status,
  thread_id: String,
  ?type: :"chatkit.client_tool_call"
}