GenerationContentData - TypeScript SDK
GenerationContentData - TypeScript SDK
GenerationContentData type definition
Stored prompt and completion content
GenerationContentData - TypeScript SDK
Stored prompt and completion content
1 import { GenerationContentData } from "@openrouter/sdk/models"; 2 3 let value: GenerationContentData = { 4 input: { 5 messages: [ 6 { 7 "content": "What is the meaning of life?", 8 "role": "user", 9 }, 10 ], 11 }, 12 output: { 13 completion: "The meaning of life is a philosophical question...", 14 reasoning: null, 15 }, 16 };
| Field | Type | Required | Description |
|---|---|---|---|
input | models.InputUnion | ✔️ | The input to the generation — either a prompt string or an array of messages |
output | models.GenerationContentDataOutput | ✔️ | The output from the generation |