Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/openai/resources/chat/completions.ts>ChatCompletionChunk.Choice.Delta

Deno build of the official Typescript library for the OpenAI API. Source: https://github.com/openai/openai-node
Extremely Popular
Go to Latest
namespace ChatCompletionChunk.Choice.Delta
import { ChatCompletionChunk } from "https://deno.land/x/openai@v4.19.0/resources/chat/completions.ts";
const { Delta } = ChatCompletionChunk.Choice;
interface ChatCompletionChunk.Choice.Delta
import { type ChatCompletionChunk } from "https://deno.land/x/openai@v4.19.0/resources/chat/completions.ts";
const { Delta } = ChatCompletionChunk.Choice;

A chat completion delta generated by streamed model responses.

Properties

optional
content: string | null

The contents of the chunk message.

optional
function_call: Delta.FunctionCall

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

optional
role:
| "system"
| "user"
| "assistant"
| "tool"

The role of the author of this message.

optional
tool_calls: Array<Delta.ToolCall>