Class: OpenAI::Models::Chat::ChatCompletionPredictionContent

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

Defined Under Namespace

Modules: Content

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, 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(content: , type: :content) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Chat::ChatCompletionPredictionContent for more details.

Static predicted output content, such as the content of a text file that is being regenerated.

Parameters:

  • content (String, Array<OpenAI::Models::Chat::ChatCompletionContentPartText>) (defaults to: )

    The content that should be matched when generating a model response.

  • type (Symbol, :content) (defaults to: :content)

    The type of the predicted content you want to provide. This type is



# File 'lib/openai/models/chat/chat_completion_prediction_content.rb', line 22

Instance Attribute Details

#contentString, Array<OpenAI::Models::Chat::ChatCompletionContentPartText>

The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly.



13
# File 'lib/openai/models/chat/chat_completion_prediction_content.rb', line 13

required :content, union: -> { OpenAI::Chat::ChatCompletionPredictionContent::Content }

#typeSymbol, :content

The type of the predicted content you want to provide. This type is currently always ‘content`.

Returns:

  • (Symbol, :content)


20
# File 'lib/openai/models/chat/chat_completion_prediction_content.rb', line 20

required :type, const: :content