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

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:

  • id —

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

  • call_id —

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

  • operation —

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

  • status —

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

  • caller_ —

    The execution context that produced this tool call.

  • created_by —

    The ID of the entity that created this tool call.

  • type (defaults to: :update_file) —

    The type of the item. Always apply_patch_call.



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

Instance Attribute Details

#call_id ⇒ String

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

#caller_ ⇒ OpenAI::Models::Responses::ResponseApplyPatchToolCall::caller_?

The execution context that produced this tool call.

Returns:

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


43
44
45
46
47
48
# 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_by ⇒ String?

The ID of the entity that created this tool call.

Returns:

  • (String, nil)


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

optional :created_by, String

#id ⇒ String

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

#operation ⇒ OpenAI::Models::Responses::ResponseApplyPatchToolCall::operation

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

Returns:

  • (OpenAI::Models::Responses::ResponseApplyPatchToolCall::operation)


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

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

#status ⇒ OpenAI::Models::Responses::ResponseApplyPatchToolCall::status

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

Returns:

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


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

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

#type ⇒ :apply_patch_call

The type of the item. Always apply_patch_call.

Returns:

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

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


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

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

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


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

def to_hash: -> {