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

x/openai_deno/mod.ts>OpenAI#createChat

OpenAI API wrapper for deno.
Latest
method OpenAI.prototype.createChat
import { OpenAI } from "https://deno.land/x/openai_deno@v0.9.8/mod.ts";

Creates a completion for the chat message

Parameters

model: string

ID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API.

messages: ChatFormat[]

A list of messages comprising the conversation so far. Example Python code.

optional
params: CreateChatParams

Optional parameters for the API.

Returns

The chat completion response.