Skip to content

LanguageModelResponseMetadata

Namespace: Vercel.AI

public class LanguageModelResponseMetadata

Metadata for a language model response, as the finish-step part carries it. Maps to Omit<LanguageModelResponseMetadata, 'messages' | 'body'>.

Inheritance: object

Derived: StepResponse

View source

LanguageModelResponseMetadata(string, DateTimeOffset, string, IReadOnlyDictionary<string, string>?)

Section titled “LanguageModelResponseMetadata(string, DateTimeOffset, string, IReadOnlyDictionary<string, string>?)”
public LanguageModelResponseMetadata(string id, DateTimeOffset timestamp, string modelId, IReadOnlyDictionary<string, string>? headers = null)

Creates response metadata.

Parameters

Name Type Description
id string
timestamp DateTimeOffset
modelId string
headers IReadOnlyDictionary<string, string>

View source

public IReadOnlyDictionary<string, string>? Headers { get; }

Response headers. <a href=“https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null"&gt;null&lt;/a> for providers that do not use HTTP.

Value: IReadOnlyDictionary<string, string>

View source

public string Id { get; }

ID for the generated response.

Value: string

View source

public string ModelId { get; }

The ID of the response model that was used to generate the response.

Value: string

View source

public DateTimeOffset Timestamp { get; }

Timestamp for the start of the generated response.

Value: DateTimeOffset

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product