Tinkex.Types.SampleResponse (Tinkex v0.3.4)

View Source

Response from sampling/text generation request.

Mirrors Python tinker.types.SampleResponse.

Summary

Functions

Parse a sample response from JSON.

Types

t()

@type t() :: %Tinkex.Types.SampleResponse{
  prompt_logprobs: [float() | nil] | nil,
  sequences: [Tinkex.Types.SampledSequence.t()],
  topk_prompt_logprobs: topk_prompt_logprobs(),
  type: String.t()
}

topk_entry()

@type topk_entry() :: {integer(), float()}

topk_prompt_logprobs()

@type topk_prompt_logprobs() :: [nil | [topk_entry()]] | nil

Functions

from_json(json)

@spec from_json(map()) :: t()

Parse a sample response from JSON.