Class: OpenAI::Models::Responses::ResponseApplyPatchToolCall

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/response_apply_patch_tool_call.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 describing how to update a file via the apply_patch tool.

Parameters:

  • diff (String)

    Diff to apply.

  • path (String)

    Path of the file to update.

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

    Update an existing file with the provided diff.



# File 'lib/openai/models/responses/response_apply_patch_tool_call.rb', line 45


Instance Attribute Details

#call_idString

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

Returns:

  • (String)


18
# File 'lib/openai/models/responses/response_apply_patch_tool_call.rb', line 18

required :call_id, String

#created_byString?

The ID of the entity that created this tool call.

Returns:

  • (String, nil)


43
# File 'lib/openai/models/responses/response_apply_patch_tool_call.rb', line 43

optional :created_by, String

#idString

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

Returns:

  • (String)


12
# File 'lib/openai/models/responses/response_apply_patch_tool_call.rb', line 12

required :id, String

#operationOpenAI::Models::Responses::ResponseApplyPatchToolCall::Operation::CreateFile, ...

One of the create_file, delete_file, or update_file operations applied via apply_patch.



25
# File 'lib/openai/models/responses/response_apply_patch_tool_call.rb', line 25

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

#statusSymbol, OpenAI::Models::Responses::ResponseApplyPatchToolCall::Status

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



31
# File 'lib/openai/models/responses/response_apply_patch_tool_call.rb', line 31

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

#typeSymbol, :apply_patch_call

The type of the item. Always ‘apply_patch_call`.

Returns:

  • (Symbol, :apply_patch_call)


37
# File 'lib/openai/models/responses/response_apply_patch_tool_call.rb', line 37

required :type, const: :apply_patch_call

Class Method Details

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



# File 'lib/openai/models/responses/response_apply_patch_tool_call.rb', line 160