Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Log probabilities for the completion

Example Usage

import { ChatTokenLogprobs } from "@openrouter/sdk/models";

let value: ChatTokenLogprobs = {
  content: [
    {
      bytes: null,
      logprob: -0.612345,
      token: " Hello",
      topLogprobs: [],
    },
  ],
};

Fields

FieldTypeRequiredDescription
contentmodels.ChatTokenLogprob[]:heavy_check_mark:Log probabilities for content tokens
refusalmodels.ChatTokenLogprob[]:heavy_minus_sign:Log probabilities for refusal tokens