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

x/openai/resources/mod.ts>ChatCompletionChunk.Choice.Delta

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
namespace ChatCompletionChunk.Choice.Delta
import { ChatCompletionChunk } from "https://deno.land/x/openai@v4.28.5/resources/mod.ts";
const { Delta } = ChatCompletionChunk.Choice;
interface ChatCompletionChunk.Choice.Delta
import { type ChatCompletionChunk } from "https://deno.land/x/openai@v4.28.5/resources/mod.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
deprecated
function_call: Delta.FunctionCall
optional
role:
| "system"
| "user"
| "assistant"
| "tool"

The role of the author of this message.

optional
tool_calls: Array<Delta.ToolCall>