Class: Anthropic::Models::Completion
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Completion
- Defined in:
- lib/anthropic/models/completion.rb
Overview
Instance Attribute Summary collapse
-
#completion ⇒ String
The resulting completion up to and excluding the stop sequences.
-
#id ⇒ String
Unique object identifier.
-
#model ⇒ Symbol, ...
The model that will complete your prompt.\n\nSee models for additional details and options.
-
#stop_reason ⇒ String?
The reason that we stopped.
-
#type ⇒ Symbol, :completion
Object type.
Instance Method Summary collapse
-
#initialize(id: , completion: , model: , stop_reason: , type: :completion) ⇒ void
constructor
Some parameter documentations has been truncated, see Completion for more details.
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(id: , completion: , model: , stop_reason: , type: :completion) ⇒ void
Some parameter documentations has been truncated, see Anthropic::Models::Completion for more details.
|
# File 'lib/anthropic/models/completion.rb', line 51
|
Instance Attribute Details
#completion ⇒ String
The resulting completion up to and excluding the stop sequences.
21 |
# File 'lib/anthropic/models/completion.rb', line 21 required :completion, String |
#id ⇒ String
Unique object identifier.
The format and length of IDs may change over time.
15 |
# File 'lib/anthropic/models/completion.rb', line 15 required :id, String |
#model ⇒ Symbol, ...
The model that will complete your prompt.\n\nSee models for additional details and options.
29 |
# File 'lib/anthropic/models/completion.rb', line 29 required :model, union: -> { Anthropic::Model } |
#stop_reason ⇒ String?
The reason that we stopped.
This may be one the following values:
"stop_sequence"
: we reached a stop sequence — either provided by you via thestop_sequences
parameter, or a stop sequence built into the model"max_tokens"
: we exceededmax_tokens_to_sample
or the model's maximum
41 |
# File 'lib/anthropic/models/completion.rb', line 41 required :stop_reason, String, nil?: true |
#type ⇒ Symbol, :completion
Object type.
For Text Completions, this is always "completion"
.
49 |
# File 'lib/anthropic/models/completion.rb', line 49 required :type, const: :completion |