ChatTokenLogprobs - TypeScript SDK

ChatTokenLogprobs type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Log probabilities for the completion

Example Usage

1import { ChatTokenLogprobs } from "@openrouter/sdk/models";
2
3let value: ChatTokenLogprobs = {
4 content: [
5 {
6 bytes: null,
7 logprob: -0.612345,
8 token: " Hello",
9 topLogprobs: [],
10 },
11 ],
12};

Fields

FieldTypeRequiredDescription
contentmodels.ChatTokenLogprob[]✔️Log probabilities for content tokens
refusalmodels.ChatTokenLogprob[]Log probabilities for refusal tokens