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

x/openai/resources/chat/mod.ts>ChatCompletionMessage

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
namespace ChatCompletionMessage
import { ChatCompletionMessage } from "https://deno.land/x/openai@v4.26.0/resources/chat/mod.ts";

Interfaces

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

interface ChatCompletionMessage
import { type ChatCompletionMessage } from "https://deno.land/x/openai@v4.26.0/resources/chat/mod.ts";

A chat completion message generated by the model.

Properties

content: string | null

The contents of the message.

role: "assistant"

The role of the author of this message.

optional
function_call: ChatCompletionMessage.FunctionCall

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

optional
tool_calls: Array<ChatCompletionMessageToolCall>

The tool calls generated by the model, such as function calls.