StepResponse
Namespace: Vercel.AI
public sealed class StepResponse : LanguageModelResponseMetadataResponse information of one step. Maps to LanguageModelResponseMetadata & { messages, body? } on StepResult.response.
Inheritance: object → LanguageModelResponseMetadata
Constructors
Section titled “Constructors”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? |
Properties
Section titled “Properties”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?
Messages
Section titled “Messages”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>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product