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

x/openai/lib/AbstractChatCompletionRunner.ts>AbstractChatCompletionRunner#finalChatCompletion

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Latest
method AbstractChatCompletionRunner.prototype.finalChatCompletion
import { AbstractChatCompletionRunner } from "https://deno.land/x/openai@v4.64.0/lib/AbstractChatCompletionRunner.ts";

Returns

Promise<ParsedChatCompletion<ParsedT>>

a promise that resolves with the final ChatCompletion, or rejects if an error occurred or the stream ended prematurely without producing a ChatCompletion.