Skip to content

StepResponse

Namespace: Vercel.AI

public sealed class StepResponse : LanguageModelResponseMetadata

Response information of one step. Maps to LanguageModelResponseMetadata & { messages, body? } on StepResult.response.

Inheritance: object → LanguageModelResponseMetadata

View source

StepResponse(string, DateTimeOffset, string, IReadOnlyDictionary<string, string>?, IReadOnlyList<ModelMessage>?, JsonElement?)

Section titled “StepResponse(string, DateTimeOffset, string, IReadOnlyDictionary<string, string>?, IReadOnlyList<ModelMessage>?, JsonElement?)”
public StepResponse(string id, DateTimeOffset timestamp, string modelId, IReadOnlyDictionary<string, string>? headers = null, IReadOnlyList<ModelMessage>? messages = null, JsonElement? body = null)

Creates step response information.

Parameters

Name Type Description
id string
timestamp DateTimeOffset
modelId string
headers IReadOnlyDictionary<string, string>
messages IReadOnlyList<ModelMessage>
body JsonElement?

View source

public JsonElement? Body { get; }

Response body, for providers that use HTTP and report it. It is not set for streams. Maps to body.

Value: JsonElement?

View source

public IReadOnlyList<ModelMessage> Messages { get; }

The response messages that were generated during the call: the assistant message of this step, then the tool message with the results the client ran. Maps to messages.

Value: IReadOnlyList<ModelMessage>

View source

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