ProviderResponse
Namespace: Vercel.AI.Operations
public sealed class ProviderResponseHeaders and body returned by one provider call.
Inheritance: object
Constructors
Section titled “Constructors”ProviderResponse(IReadOnlyDictionary<string, string>?, JsonElement?, string?, DateTime?, string?, JsonElement?)
Section titled “ProviderResponse(IReadOnlyDictionary<string, string>?, JsonElement?, string?, DateTime?, string?, JsonElement?)”public ProviderResponse(IReadOnlyDictionary<string, string>? headers = null, JsonElement? body = null, string? id = null, DateTime? timestamp = null, string? modelId = null, JsonElement? providerMetadata = null)Creates response metadata.
Parameters
| Name | Type | Description |
|---|---|---|
headers |
IReadOnlyDictionary<string, string> | |
body |
JsonElement? | |
id |
string | |
timestamp |
DateTime? | |
modelId |
string | |
providerMetadata |
JsonElement? |
Properties
Section titled “Properties”public JsonElement? Body { get; }Response body.
Value: JsonElement?
Headers
Section titled “Headers”public IReadOnlyDictionary<string, string>? Headers { get; }Response headers.
Value: IReadOnlyDictionary<string, string>
public string? Id { get; }Provider response id.
Value: string
ModelId
Section titled “ModelId”public string? ModelId { get; }Model id reported by the provider.
Value: string
ProviderMetadata
Section titled “ProviderMetadata”public JsonElement? ProviderMetadata { get; }Provider metadata stored on the response, when the call includes it there.
Value: JsonElement?
Timestamp
Section titled “Timestamp”public DateTime? Timestamp { get; }Provider timestamp.
Value: DateTime?
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product