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

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

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

Removes the specified listener from the listener array for the event. off() will remove, at most, one instance of a listener from the listener array. If any single listener has been added multiple times to the listener array for the specified event, then off() must be called multiple times to remove each instance.

Type Parameters

Event extends keyof Events

Parameters

event: Event
listener: ListenerForEvent<Events, Event>

Returns

this

this ChatCompletionStream, so that calls can be chained