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

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

Defined Under Namespace

Modules: Caller, 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 54

Instance Attribute Details

#call_idString

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

Parameters:

  • value (String)

Returns:

  • (String)


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

required :call_id, String

#caller_OpenAI::Models::Responses::ResponseApplyPatchToolCall::Caller::Direct, ...

The execution context that produced this tool call.

Parameters:

  • value (OpenAI::Models::Responses::ResponseApplyPatchToolCall::caller_, nil)

Returns:



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

optional :caller_,
union: -> { OpenAI::Responses::ResponseApplyPatchToolCall::Caller },
api_name: :caller,
nil?: true

#created_byString?

The ID of the entity that created this tool call.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :created_by, String

#idString

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

Parameters:

  • value (String)

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.

Parameters:

  • value (OpenAI::Models::Responses::ResponseApplyPatchToolCall::status)

Returns:



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.

Parameters:

  • value (: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

Instance Method Details

#to_hash{

Returns:

  • ({)


42
# File 'sig/openai/models/responses/response_apply_patch_tool_call.rbs', line 42

def to_hash: -> {