Class: OpenAI::Models::Chat::ChatCompletionContentPart::File

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/chat/chat_completion_content_part.rb

Defined Under Namespace

Classes: File, PromptCacheBreakpoint

Instance Attribute 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(file_data: nil, file_id: nil, filename: nil) ⇒ Object

Some parameter documentations has been truncated, see File for more details.

Parameters:

  • file_data (String) (defaults to: nil)

    The base64 encoded file data, used when passing the file to the model

  • file_id (String) (defaults to: nil)

    The ID of an uploaded file to use as input.

  • filename (String) (defaults to: nil)

    The name of the file, used when passing the file to the model as a



# File 'lib/openai/models/chat/chat_completion_content_part.rb', line 46

Instance Attribute Details

#fileOpenAI::Models::Chat::ChatCompletionContentPart::File::File



29
# File 'lib/openai/models/chat/chat_completion_content_part.rb', line 29

required :file, -> { OpenAI::Chat::ChatCompletionContentPart::File::File }

#prompt_cache_breakpointOpenAI::Models::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint?

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.



43
44
# File 'lib/openai/models/chat/chat_completion_content_part.rb', line 43

optional :prompt_cache_breakpoint,
-> { OpenAI::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint }

#typeSymbol, :file

The type of the content part. Always file.

Returns:

  • (Symbol, :file)


35
# File 'lib/openai/models/chat/chat_completion_content_part.rb', line 35

required :type, const: :file