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

Returns a new instance of ApplyPatchCall.

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.

  • call_id: (String)
  • operation: (OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::operation)
  • status: (OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::status)
  • id: (String, nil)
  • caller_: (OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::caller_, nil)
  • type: (:apply_patch_call) (defaults to: :update_file)


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

Instance Attribute Details

#call_id ⇒ String

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

Returns:

  • (String)


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

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)


1581
1582
1583
1584
1585
1586
# File 'lib/openai/models/responses/response_input_item.rb', line 1581

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

#id ⇒ String?

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

Returns:

  • (String, nil)


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

optional :id, String, nil?: true

#operation ⇒ OpenAI::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)


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

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

#status ⇒ OpenAI::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)


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

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)


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

required :type, const: :apply_patch_call

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


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

.variants ⇒ Array(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 1717

Instance Method Details

#to_hash ⇒ { call_id: String, operation: OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::operation, status: OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::status, ?type: :apply_patch_call, ?id: String?, ?caller_: OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::caller_? }

Returns:

  • ({ call_id: String, operation: OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::operation, status: OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::status, ?type: :apply_patch_call, ?id: String?, ?caller_: OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::caller_? })


1376
1377
1378
1379
1380
1381
1382
1383
# File 'sig/openai/models/responses/response_input_item.rbs', line 1376

def to_hash: -> {
  call_id: String,
  operation: OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::operation,
  status: OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::status,
  ?type: :apply_patch_call,
  ?id: String?,
  ?caller_: OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::caller_?
}