Current section
Files
Jump to
Current section
Files
lib/snakebridge_generated/vllm/outputs/classification_request_output.ex
# Generated by SnakeBridge v0.16.0 - DO NOT EDIT MANUALLY
# Regenerate with: mix compile
# Library: vllm 0.14.0
# Python module: vllm.outputs
# Python class: ClassificationRequestOutput
defmodule Vllm.Outputs.ClassificationRequestOutput do
@moduledoc """
The output data of a pooling request to the LLM.
## Parameters
- `request_id` - A unique identifier for the pooling request. (type: `String.t()`)
- `outputs` - The pooling results for the given input. (type: `PoolingOutput`)
- `prompt_token_ids` - A list of token IDs used in the prompt. (type: `list(integer())`)
- `num_cached_tokens` - The number of tokens with prefix cache hit.
- `finished` - A flag indicating whether the pooling is completed. (type: `boolean()`)
"""
def __snakebridge_python_name__, do: "vllm.outputs"
def __snakebridge_python_class__, do: "ClassificationRequestOutput"
def __snakebridge_library__, do: "vllm"
@opaque t :: SnakeBridge.Ref.t()
@doc """
Initialize self. See help(type(self)) for accurate signature.
## Parameters
- `request_id` (String.t())
- `outputs` (term())
- `prompt_token_ids` (list(integer()))
- `num_cached_tokens` (integer())
- `finished` (boolean())
"""
@spec new(String.t(), term(), list(integer()), integer(), boolean(), keyword()) ::
{:ok, SnakeBridge.Ref.t()} | {:error, Snakepit.Error.t()}
def new(request_id, outputs, prompt_token_ids, num_cached_tokens, finished, opts \\ []) do
SnakeBridge.Runtime.call_class(
__MODULE__,
:__init__,
[request_id, outputs, prompt_token_ids, num_cached_tokens, finished],
opts
)
end
@doc """
Python method `ClassificationRequestOutput.from_base`.
## Parameters
- `request_output` (Vllm.Outputs.PoolingRequestOutput.t())
## Returns
- `term()`
"""
@spec from_base(SnakeBridge.Ref.t(), Vllm.Outputs.PoolingRequestOutput.t(), keyword()) ::
{:ok, term()} | {:error, Snakepit.Error.t()}
def from_base(ref, request_output, opts \\ []) do
SnakeBridge.Runtime.call_method(ref, :from_base, [request_output], opts)
end
end