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

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

Defined Under Namespace

Modules: Operation, Status

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

Instruction for updating an existing file via the apply_patch tool.

Parameters:

  • diff (String)

    Unified diff content to apply to the existing file.

  • path (String)

    Path of the file to update relative to the workspace root.

  • type (Symbol, :update_file) (defaults to: :update_file)

    The operation type. Always ‘update_file`.



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

Instance Attribute Details

#call_idString

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

Returns:

  • (String)


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

required :call_id, String

#idString?

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

Returns:

  • (String, nil)


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

optional :id, String, nil?: true

#operationOpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Operation::CreateFile, ...

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



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

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

#statusSymbol, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall::Status

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



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

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

#typeSymbol, :apply_patch_call

The type of the item. Always ‘apply_patch_call`.

Returns:

  • (Symbol, :apply_patch_call)


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

required :type, const: :apply_patch_call

Class Method Details