Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/openai_deno/mod.ts>ChatFormat

OpenAI API wrapper for deno.
Latest
interface ChatFormat
Re-export
import { type ChatFormat } from "https://deno.land/x/openai_deno@v0.9.8/mod.ts";

Properties

role:
| "user"
| "assistant"
| "system"
| "function"
| string

The role of the messages author. One of system, user, assistant, or function.

optional
content: string

The contents of the message. content is required for all messages except assistant messages with function calls.

optional
name: string

The name of the author of this message. name is required if role is function, and it should be the name of the function whose response is in the content. May contain a-z, A-Z, 0-9, and underscores, with a maximum length of 64 characters.

optional
functionCall: ChatFunctionCall

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