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

x/openai/mod.ts>OpenAI#createChatCompletionStream

Unofficial Deno wrapper for the Open Ai api
Extremely Popular
Go to Latest
method OpenAI.prototype.createChatCompletionStream
import { OpenAI } from "https://deno.land/x/openai@1.4.1/mod.ts";

Creates a completion stream for the chat message

https://platform.openai.com/docs/api-reference/chat/create

Parameters

callback: (chunk: ChatCompletionStream) => void

Returns

Promise<void>