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
Latest
namespace ChatCompletionChunk.Choice.Delta
import { ChatCompletionChunk } from "https://deno.land/x/openai@v4.69.0/resources/mod.ts";
const { Delta } = ChatCompletionChunk.Choice;
interface ChatCompletionChunk.Choice.Delta
import { type ChatCompletionChunk } from "https://deno.land/x/openai@v4.69.0/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
refusal: string | null

The refusal message generated by the model.

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

The role of the author of this message.

optional
tool_calls: Array<Delta.ToolCall>