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

x/openai_deno/mod.ts>OpenAI#createMessage

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

Create a message.

Parameters

threadID: string

The ID of the thread to create a message for.

role: "user" | string

The role of the entity that is creating the message. Currently only user is supported.

content: string

The content of the message.

optional
params: CreateMessageParams

Optional parameters for the API.

Returns

Promise<Message>

A message object.