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

x/openai/src/openai.ts>OpenAI#createCompletionStream

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

Creates a completion stream for the provided prompt and parameters

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

Parameters

options: Omit<CompletionOptions, "bestOf">
callback: (chunk: CompletionStream) => void

Returns

Promise<void>