補完
テキスト補完を作成
Deprecated
client.Completions.New(ctx, params) (*Completion, error)POST/v1/complete
[レガシー] テキスト補完を作成します。
Models
type Completion struct { Type: "completion"; ID; Completion; /* 2 more */ }
type Completion struct { Type: "completion"; ID; Completion; /* 2 more */ }
Type CompletionObject type.
Type Completion
Object type.
For Text Completions, this is always "completion".
defaultcompletion
ID stringUnique object identifier.
ID string
Unique object identifier.
The format and length of IDs may change over time.
Completion string
The resulting completion up to and excluding the stop sequences.
StopReason stringThe reason that we stopped.
StopReason 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_sequencesparameter, or a stop sequence built into the model"max_tokens": we exceededmax_tokens_to_sampleor the model's maximum