Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/openai/lib/ChatCompletionStream.ts>ChatCompletionSnapshot.Choice.Message

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
namespace ChatCompletionSnapshot.Choice.Message
import { ChatCompletionSnapshot } from "https://deno.land/x/openai@v4.52.1/lib/ChatCompletionStream.ts";
const { Message } = ChatCompletionSnapshot.Choice;
interface ChatCompletionSnapshot.Choice.Message
import { type ChatCompletionSnapshot } from "https://deno.land/x/openai@v4.52.1/lib/ChatCompletionStream.ts";
const { Message } = ChatCompletionSnapshot.Choice;

A chat completion delta generated by streamed model responses.

Properties

optional
content: string | null

The contents of the chunk message.

optional
function_call: Message.FunctionCall

The name and arguments of a function that should be called, as generated by the model.

optional
tool_calls: Array<Message.ToolCall>
optional
role:
| "system"
| "user"
| "assistant"
| "function"
| "tool"

The role of the author of this message.