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

x/openai/resources/chat/completions.ts

Deno build of the official Typescript library for the OpenAI API. Source: https://github.com/openai/openai-node
Extremely Popular
Go to Latest
import * as openai from "https://deno.land/x/openai@v4.19.1/resources/chat/completions.ts";

Interfaces

Represents a chat completion response returned by model, based on the provided input.

Deprecated and replaced by tool_calls. The name and arguments of a function that should be called, as generated by the model.

Represents a streamed chunk of a chat completion response returned by model, based on the provided input.

A chat completion delta generated by streamed model responses.

Deprecated and replaced by tool_calls. The name and arguments of a function that should be called, as generated by the model.

An object specifying the format that the model must output.

Specifying a particular function via {"name": "my_function"} forces the model to call that function.

A chat completion message generated by the model.

Deprecated and replaced by tool_calls. The name and arguments of a function that should be called, as generated by the model.

The function that the model called.

Specifies a tool the model should use. Use to force the model to call a specific function.

Type Aliases

The role of the author of a message

Controls which (if any) function is called by the model. none means the model will not call a function and instead generates a message. auto means the model can pick between generating a message or calling a function. Specifying a particular function via {"type: "function", "function": {"name": "my_function"}} forces the model to call that function.