Class: OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/response_input_item.rb,
sig/openai/models/responses/response_input_item.rbs

Defined Under Namespace

Modules: Caller, Operation, Status

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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_with_error, 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(diff:, path:, type: :update_file) ⇒ Object

Parameters:

  • call_id

    The unique ID of the apply patch tool call generated by the model.

  • operation

    The specific create, delete, or update instruction for the apply_patch tool call.

  • status

    The status of the apply patch tool call. One of in_progress or completed.

  • id

    The unique ID of the apply patch tool call. Populated when this item is returned via API.

  • caller_

    The execution context that produced this tool call.

  • type (defaults to: :update_file)

    The type of the item. Always apply_patch_call.



# File 'lib/openai/models/responses/response_input_item.rb', line 1439


Instance Attribute Details

#call_idString

The unique ID of the apply patch tool call generated by the model.

Returns:

  • (String)


1400
# File 'lib/openai/models/responses/response_input_item.rb', line 1400

required :call_id, String

#caller_OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::caller_?

The execution context that produced this tool call.

Returns:

  • (OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::caller_, nil)


1432
1433
1434
1435
1436
1437
# File 'lib/openai/models/responses/response_input_item.rb', line 1432

optional(
  :caller_,
  union: -> { OpenAI::Responses::ResponseInputItem::ApplyPatchCall::Caller },
  api_name: :caller,
  nil?: true
)

#idString?

The unique ID of the apply patch tool call. Populated when this item is returned via API.

Returns:

  • (String, nil)


1426
# File 'lib/openai/models/responses/response_input_item.rb', line 1426

optional :id, String, nil?: true

#operationOpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::operation

The specific create, delete, or update instruction for the apply_patch tool call.

Returns:

  • (OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::operation)


1407
# File 'lib/openai/models/responses/response_input_item.rb', line 1407

required :operation, union: -> { OpenAI::Responses::ResponseInputItem::ApplyPatchCall::Operation }

#statusOpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::status

The status of the apply patch tool call. One of in_progress or completed.

Returns:

  • (OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::status)


1413
# File 'lib/openai/models/responses/response_input_item.rb', line 1413

required :status, enum: -> { OpenAI::Responses::ResponseInputItem::ApplyPatchCall::Status }

#type:apply_patch_call

The type of the item. Always apply_patch_call.

Returns:

  • (:apply_patch_call)


1419
# File 'lib/openai/models/responses/response_input_item.rb', line 1419

required :type, const: :apply_patch_call

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/responses/response_input_item.rb', line 1581


.variantsArray(OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Operation::CreateFile, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Operation::DeleteFile, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Operation::UpdateFile)



# File 'lib/openai/models/responses/response_input_item.rb', line 1568


Instance Method Details

#to_hash{

Returns:

  • ({)


1218
# File 'sig/openai/models/responses/response_input_item.rbs', line 1218

def to_hash: -> {