The output data of one completion output of a request.
Parameters
index- The index of the output in the request.text- The generated output text.token_ids- The token IDs of the generated output text.cumulative_logprob- The cumulative log probability of the generated output text.logprobs- The log probabilities of the top probability words at each position if the logprobs are requested.finish_reason- The reason why the sequence is finished.stop_reason- The stop string or token id that caused the completion to stop, None if the completion finished for some other reason including encountering the EOS token.lora_request- The LoRA request that was used to generate the output.
Summary
Functions
Python method CompletionOutput.finished.
Initialize self. See help(type(self)) for accurate signature.
Types
Functions
@spec finish_reason(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec finished( SnakeBridge.Ref.t(), keyword() ) :: {:ok, boolean()} | {:error, Snakepit.Error.t()}
Python method CompletionOutput.finished.
Returns
boolean()
@spec lora_request(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec new(integer(), String.t(), term(), term(), term(), [term()], keyword()) :: {:ok, SnakeBridge.Ref.t()} | {:error, Snakepit.Error.t()}
Initialize self. See help(type(self)) for accurate signature.
Parameters
index(integer())text(String.t())token_ids(term())cumulative_logprob(term())logprobs(term())routed_experts(term() default: None)finish_reason(term() default: None)stop_reason(term() default: None)lora_request(term() default: None)
@spec routed_experts(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec stop_reason(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}