CompletionLogprobs - TypeScript SDK

CompletionLogprobs type definition

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

Example Usage

1import { CompletionLogprobs } from "@openrouter/sdk/models";
2
3let value: CompletionLogprobs = {
4 tokens: [
5 "<value 1>",
6 "<value 2>",
7 "<value 3>",
8 ],
9 tokenLogprobs: [
10 2988.44,
11 7128.75,
12 8377.63,
13 ],
14 topLogprobs: null,
15 textOffset: [
16 1144.74,
17 3297.78,
18 ],
19};

Fields

FieldTypeRequiredDescription
tokensstring[]✔️N/A
tokenLogprobsnumber[]✔️N/A
topLogprobsRecord<string, *number*>[]✔️N/A
textOffsetnumber[]✔️N/A