ai
Version:
AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.
39 lines (32 loc) • 937 B
text/typescript
import type { ResponseMessage } from '../generate-text/response-message';
/**
* Metadata for a language model response.
*/
export type LanguageModelResponseMetadata = {
/**
* The response messages that were generated during the call.
* Response messages can be either assistant messages or tool messages.
* They contain a generated id.
*/
readonly messages: Array<ResponseMessage>;
/**
* ID for the generated response.
*/
readonly id: string;
/**
* Timestamp for the start of the generated response.
*/
readonly timestamp: Date;
/**
* The ID of the response model that was used to generate the response.
*/
readonly modelId: string;
/**
* Response headers (available only for providers that use HTTP requests).
*/
readonly headers?: Record<string, string>;
/**
* Response body (available only for providers that use HTTP requests).
*/
readonly body?: unknown;
};