Skip to main content
Module

x/openai/resources/chat/completions.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.21.0/resources/chat/completions.ts";
const { Delta } = ChatCompletionChunk.Choice;
interface ChatCompletionChunk.Choice.Delta
import { type ChatCompletionChunk } from "https://deno.land/x/openai@v4.21.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>