OpenAIChatPromptMessage
Namespace: Vercel.AI.OpenAI
public sealed class OpenAIChatPromptMessageOne prompt message converted into an OpenAI chat message.
Inheritance: object
Constructors
Section titled “Constructors”OpenAIChatPromptMessage(string)
Section titled “OpenAIChatPromptMessage(string)”public OpenAIChatPromptMessage(string role)Creates a message.
Parameters
| Name | Type | Description |
|---|---|---|
role |
string |
Properties
Section titled “Properties”public IReadOnlyList<OpenAIChatPromptPart>? Parts { get; set; }User or assistant parts.
Value: IReadOnlyList<OpenAIChatPromptPart>
ProviderOptions
Section titled “ProviderOptions”public JsonElement? ProviderOptions { get; set; }Provider options for this message. The openai object is read.
Value: JsonElement?
public string Role { get; }system, user, assistant, or tool.
Value: string
public string? Text { get; set; }System text, or assistant text when there are no parts.
Value: string
ToolCallId
Section titled “ToolCallId”public string? ToolCallId { get; set; }Tool result id.
Value: string
ToolCalls
Section titled “ToolCalls”public IReadOnlyList<GeneratedToolCall>? ToolCalls { get; set; }Assistant tool calls.
Value: IReadOnlyList<GeneratedToolCall>
ToolOutput
Section titled “ToolOutput”public string? ToolOutput { get; set; }Tool result text.
Value: string
ToolOutputType
Section titled “ToolOutputType”public string? ToolOutputType { get; set; }Tool result type: text, json, error-text, error-json, or execution-denied.
Error types are sent as {"error": value}. When it is null, ToolOutput is sent as is.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product