Packages

vLLM for Elixir via SnakeBridge - Easy, fast, and cheap LLM serving for everyone. High-throughput LLM inference with PagedAttention, continuous batching, and OpenAI-compatible API.

Current section

Files

Jump to
vllm lib snakebridge_generated vllm outputs classification_output.ex
Raw

lib/snakebridge_generated/vllm/outputs/classification_output.ex

# Generated by SnakeBridge v0.15.0 - DO NOT EDIT MANUALLY
# Regenerate with: mix compile
# Library: vllm 0.14.0
# Python module: vllm.outputs
# Python class: ClassificationOutput
defmodule Vllm.Outputs.ClassificationOutput do
@moduledoc """
The output data of one classification output of a request.
## Parameters
- `probs` - The probability vector, which is a list of floats. Its length depends on the number of classes.
"""
def __snakebridge_python_name__, do: "vllm.outputs"
def __snakebridge_python_class__, do: "ClassificationOutput"
def __snakebridge_library__, do: "vllm"
@opaque t :: SnakeBridge.Ref.t()
@doc """
Initialize self. See help(type(self)) for accurate signature.
## Parameters
- `probs` (list(float()))
"""
@spec new(list(float()), keyword()) :: {:ok, SnakeBridge.Ref.t()} | {:error, Snakepit.Error.t()}
def new(probs, opts \\ []) do
SnakeBridge.Runtime.call_class(__MODULE__, :__init__, [probs], opts)
end
@doc """
Python method `ClassificationOutput.from_base`.
## Parameters
- `pooling_output` (Vllm.Outputs.PoolingOutput.t())
## Returns
- `term()`
"""
@spec from_base(SnakeBridge.Ref.t(), Vllm.Outputs.PoolingOutput.t(), keyword()) ::
{:ok, term()} | {:error, Snakepit.Error.t()}
def from_base(ref, pooling_output, opts \\ []) do
SnakeBridge.Runtime.call_method(ref, :from_base, [pooling_output], opts)
end
@spec num_classes(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
def num_classes(ref) do
SnakeBridge.Runtime.get_attr(ref, :num_classes)
end
end