Class: OpenAI::Models::Beta::BetaResponseFileSearchToolCall

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

Defined Under Namespace

Modules: Status Classes: Agent, Result

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(agent_name:) ⇒ BetaResponseFileSearchToolCall

Returns a new instance of BetaResponseFileSearchToolCall.

Parameters:

  • id —

    The unique ID of the file search tool call.

  • queries —

    The queries used to search for files.

  • status —

    The status of the file search tool call. One of in_progress, searching, incomplete or failed,

  • agent —

    The agent that produced this item.

  • results —

    The results of the file search tool call.

  • type —

    The type of the file search tool call. Always file_search_call.

  • id: (String)
  • queries: (::Array[String])
  • status: (OpenAI::Models::Beta::BetaResponseFileSearchToolCall::status)
  • agent: (OpenAI::Beta::BetaResponseFileSearchToolCall::Agent, nil)
  • results: (::Array[OpenAI::Beta::BetaResponseFileSearchToolCall::Result], nil)
  • type: (:file_search_call)


# File 'lib/openai/models/beta/beta_response_file_search_tool_call.rb', line 48

Instance Attribute Details

#agent ⇒ OpenAI::Beta::BetaResponseFileSearchToolCall::Agent?

The agent that produced this item.

Returns:

  • (OpenAI::Beta::BetaResponseFileSearchToolCall::Agent, nil)


36
# File 'lib/openai/models/beta/beta_response_file_search_tool_call.rb', line 36

optional :agent, -> { OpenAI::Beta::BetaResponseFileSearchToolCall::Agent }, nil?: true

#id ⇒ String

The unique ID of the file search tool call.

Returns:

  • (String)


11
# File 'lib/openai/models/beta/beta_response_file_search_tool_call.rb', line 11

required :id, String

#queries ⇒ ::Array[String]

The queries used to search for files.

Returns:

  • (::Array[String])


17
# File 'lib/openai/models/beta/beta_response_file_search_tool_call.rb', line 17

required :queries, OpenAI::Internal::Type::ArrayOf[String]

#results ⇒ ::Array[OpenAI::Beta::BetaResponseFileSearchToolCall::Result]?

The results of the file search tool call.

Returns:

  • (::Array[OpenAI::Beta::BetaResponseFileSearchToolCall::Result], nil)


42
43
44
45
46
# File 'lib/openai/models/beta/beta_response_file_search_tool_call.rb', line 42

optional(
  :results,
  -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::BetaResponseFileSearchToolCall::Result] },
  nil?: true
)

#status ⇒ OpenAI::Models::Beta::BetaResponseFileSearchToolCall::status

The status of the file search tool call. One of in_progress, searching, incomplete or failed,

Returns:

  • (OpenAI::Models::Beta::BetaResponseFileSearchToolCall::status)


24
# File 'lib/openai/models/beta/beta_response_file_search_tool_call.rb', line 24

required :status, enum: -> { OpenAI::Beta::BetaResponseFileSearchToolCall::Status }

#type ⇒ :file_search_call

The type of the file search tool call. Always file_search_call.

Returns:

  • (:file_search_call)


30
# File 'lib/openai/models/beta/beta_response_file_search_tool_call.rb', line 30

required :type, const: :file_search_call

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_response_file_search_tool_call.rb', line 85

Instance Method Details

#to_hash ⇒ { id: String, queries: ::Array[String], status: OpenAI::Models::Beta::BetaResponseFileSearchToolCall::status, ?type: :file_search_call, ?agent: OpenAI::Beta::BetaResponseFileSearchToolCall::Agent?, ?results: ::Array[OpenAI::Beta::BetaResponseFileSearchToolCall::Result]? }

Returns:

  • ({ id: String, queries: ::Array[String], status: OpenAI::Models::Beta::BetaResponseFileSearchToolCall::status, ?type: :file_search_call, ?agent: OpenAI::Beta::BetaResponseFileSearchToolCall::Agent?, ?results: ::Array[OpenAI::Beta::BetaResponseFileSearchToolCall::Result]? })


58
59
60
61
62
63
64
65
# File 'sig/openai/models/beta/beta_response_file_search_tool_call.rbs', line 58

def to_hash: -> {
  id: String,
  queries: ::Array[String],
  status: OpenAI::Models::Beta::BetaResponseFileSearchToolCall::status,
  ?type: :file_search_call,
  ?agent: OpenAI::Beta::BetaResponseFileSearchToolCall::Agent?,
  ?results: ::Array[OpenAI::Beta::BetaResponseFileSearchToolCall::Result]?
}