Skip to main content
This release is 11 versions behind 2.0.0 — the latest version of @open-schemas/types. Jump to latest

Type definitions for the API of LLM providers.

Works with
This package works with Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Browsers
JSR Score
100%
Published
a week ago
indexopenai
deno add @open-schemas/types
import * as mod from "@open-schemas/types/openai";
npx jsr add @open-schemas/types
import * as mod from "@open-schemas/types/openai";
yarn dlx jsr add @open-schemas/types
import * as mod from "@open-schemas/types/openai";
pnpm dlx jsr add @open-schemas/types
import * as mod from "@open-schemas/types/openai";
bunx jsr add @open-schemas/types
import * as mod from "@open-schemas/types/openai";

This module contains types for OpenAI API.

Examples

Example 1

import { CreateChatCompletionRequest } from "@open-schemas/types/openai";

const request: CreateChatCompletionRequest = {};

Type Aliases

T

A list of Files attached to an assistant.

T
AssistantObject
from openai

Represents an assistant that can call the model and use tools.

T
No documentation available
No documentation available
No documentation available
No documentation available
T
No documentation available
No documentation available
T

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

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
T
ChatCompletionTool
from openai
No documentation available
T
No documentation available

Image output from the Code Interpreter tool call as part of a run step.

Text output from the Code Interpreter tool call as part of a run step.

T

The output of code interpreter tool

T

Code interpreter tool

Details of the Code Interpreter tool call the run step was involved in.

Create an assistant file by attaching a File to an assistant.

T

Create an assistant with a model and instructions.

No documentation available
T
No documentation available
T
CreateRunRequest
from openai

Create a run

Create a thread and run it in one request.

T

Create a thread.

T

A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the retrieval tool to search files.

T
FilePathAnnotation
from openai

A URL for the file that's generated when the assistant used the code_interpreter tool to generate a file.

T
FinishReason
from openai
No documentation available
T
FunctionTool
from openai

Function tool

T
FunctionToolCall
from openai

Function tool call

T

Message creation detail

T
MessageFileObject
from openai

A list of files attached to a message.

References an image File in the content of a message.

T
MessageObject
from openai

Represents a message within a thread.

T
MessageTextContent
from openai

The text content that is part of a message.

T
Metadata
from openai

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.

T

Modifies an assistant.

T

Modifies a message.

T
ModifyRunRequest
from openai

Modifies a run.

T

Modifies a thread.

T
ObjectMeta
from openai
No documentation available
T
RetrievalTool
from openai

Retrieval tool

T
RetrievalToolCall
from openai

Retrieval tool call

T
RunObject
from openai

Represents an execution run on a thread.

T
StepObject
from openai
No documentation available

SubmitToolOutputs action.

Submit tool outputs to run.

T
ThreadObject
from openai

Represents a thread that contains messages.

T
Tool
from openai
No documentation available
T
ToolCall
from openai
No documentation available
T
ToolCallsDetail
from openai

Tool calls detail

T
ToolOutput
from openai

Detial of tool output.

T
Usage
from openai

Usage statistics related to the run or step.