Class: OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall
- Defined in:
- lib/openai/models/chat/chat_completion_chunk.rb,
sig/openai/models/chat/chat_completion_chunk.rbs
Defined Under Namespace
Modules: Type Classes: Function
Instance Attribute Summary collapse
- #function ⇒ OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Function?
-
#id ⇒ String?
The ID of the tool call.
- #index ⇒ Integer
-
#type ⇒ OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::type_?
The type of the tool.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(arguments: nil, name: nil) ⇒ ToolCall
constructor
A new instance of ToolCall.
- #to_hash ⇒ { index: Integer, ?id: String, ?function: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Function, ?type: OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::type_ }
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(arguments: nil, name: nil) ⇒ ToolCall
Returns a new instance of ToolCall.
|
|
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 420
|
Instance Attribute Details
#function ⇒ OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Function?
412 |
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 412 optional :function, -> { OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Function } |
#id ⇒ String?
The ID of the tool call.
407 |
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 407 optional :id, String |
#index ⇒ Integer
401 |
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 401 required :index, Integer |
#type ⇒ OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::type_?
The type of the tool. Currently, only function is supported.
418 |
# File 'lib/openai/models/chat/chat_completion_chunk.rb', line 418 optional :type, enum: -> { OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Type } |
Instance Method Details
#to_hash ⇒ { index: Integer, ?id: String, ?function: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Function, ?type: OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::type_ }
468 469 470 471 472 473 |
# File 'sig/openai/models/chat/chat_completion_chunk.rbs', line 468
def to_hash: -> {
index: Integer,
?id: String,
?function: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::Function,
?type: OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall::type_
}
|