Class: OpenAI::Models::Chat::ChatCompletionContentPart::File
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Chat::ChatCompletionContentPart::File
- Defined in:
- lib/openai/models/chat/chat_completion_content_part.rb,
sig/openai/models/chat/chat_completion_content_part.rbs
Defined Under Namespace
Classes: File, PromptCacheBreakpoint
Instance Attribute Summary collapse
- #file ⇒ OpenAI::Models::Chat::ChatCompletionContentPart::File::File
-
#prompt_cache_breakpoint ⇒ OpenAI::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint?
Marks the exact end of a reusable prompt prefix.
-
#type ⇒ :file
The type of the content part.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(file_data: nil, file_id: nil, filename: nil) ⇒ File
constructor
A new instance of File.
- #to_hash ⇒ { file: OpenAI::Chat::ChatCompletionContentPart::File::File, ?type: :file, ?prompt_cache_breakpoint: OpenAI::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint }
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(file_data: nil, file_id: nil, filename: nil) ⇒ File
Returns a new instance of File.
|
|
# File 'lib/openai/models/chat/chat_completion_content_part.rb', line 47
|
Instance Attribute Details
#file ⇒ OpenAI::Models::Chat::ChatCompletionContentPart::File::File
28 |
# File 'lib/openai/models/chat/chat_completion_content_part.rb', line 28 required :file, -> { OpenAI::Chat::ChatCompletionContentPart::File::File } |
#prompt_cache_breakpoint ⇒ OpenAI::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint?
Marks the exact end of a reusable prompt prefix. When ttl is omitted, the
breakpoint inherits the request's prompt_cache_options.ttl; the boundary is
not rounded to a token block.
42 43 44 45 |
# File 'lib/openai/models/chat/chat_completion_content_part.rb', line 42 optional( :prompt_cache_breakpoint, -> { OpenAI::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint } ) |
#type ⇒ :file
The type of the content part. Always file.
34 |
# File 'lib/openai/models/chat/chat_completion_content_part.rb', line 34 required :type, const: :file |
Instance Method Details
#to_hash ⇒ { file: OpenAI::Chat::ChatCompletionContentPart::File::File, ?type: :file, ?prompt_cache_breakpoint: OpenAI::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint }
52 53 54 55 56 |
# File 'sig/openai/models/chat/chat_completion_content_part.rbs', line 52
def to_hash: -> {
file: OpenAI::Chat::ChatCompletionContentPart::File::File,
?type: :file,
?prompt_cache_breakpoint: OpenAI::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint
}
|