Skip to main content
Module

x/openai/resources/beta/mod.ts

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
import * as openai from "https://deno.land/x/openai@v4.56.0/resources/beta/mod.ts";

Namespaces

Interfaces

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

A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400.

Occurs when an error occurs. This can happen due to an internal server error or a timeout.

Occurs when a new thread is created.

Occurs when a message is completed.

Occurs when a message is created.

Occurs when parts of a Message are being streamed.

Occurs when a message ends before it is completed.

Occurs when a message moves to an in_progress state.

Occurs when a run is cancelled.

Occurs when a run moves to a cancelling status.

Occurs when a run is completed.

Occurs when a new run is created.

Occurs when a run expires.

Occurs when a run fails.

Occurs when a run ends with status incomplete.

Occurs when a run moves to an in_progress status.

Occurs when a run moves to a queued status.

Occurs when a run moves to a requires_action status.

Occurs when a run step is cancelled.

Occurs when a run step is completed.

Occurs when a run step is created.

Occurs when parts of a run step are being streamed.

Occurs when a run step expires.

Occurs when a run step fails.

Occurs when a run step moves to an in_progress state.

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

A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

Overrides for the file search tool.

Occurs when a message is completed.

Occurs when a message is created.

Occurs when parts of a Message are being streamed.

Occurs when a message ends before it is completed.

Occurs when a message moves to an in_progress state.

Occurs when a run step is cancelled.

Occurs when a run step is completed.

Occurs when a run step is created.

Occurs when parts of a run step are being streamed.

Occurs when a run step expires.

Occurs when a run step fails.

Occurs when a run step moves to an in_progress state.

Occurs when a run is cancelled.

Occurs when a run moves to a cancelling status.

Occurs when a run is completed.

Occurs when a new run is created.

Occurs when a run expires.

Occurs when a run fails.

Occurs when a run ends with status incomplete.

Occurs when a run moves to an in_progress status.

Occurs when a run moves to a queued status.

Occurs when a run moves to a requires_action status.

Represents a thread that contains messages.

A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

If no thread is provided, an empty thread will be created.

A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400.

A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.

If no thread is provided, an empty thread will be created.

A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.

If no thread is provided, an empty thread will be created.

A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.

A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400.

Occurs when a new thread is created.

A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

A vector store is a collection of processed files can be used by the file_search tool.

The expiration policy for a vector store.

The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400.

The expiration policy for a vector store.

The expiration policy for a vector store.

Type Aliases

Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106.

Represents an event emitted when streaming a Run.

Controls which (if any) tool is called by the model. none means the model will not call any tools and instead generates a message. auto is the default value and means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools before responding to the user. Specifying a particular tool like {"type": "file_search"} or {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool.

Occurs when a message is created.

Occurs when a run step is created.

Occurs when a new run is created.