Tool

sealed class Tool

Represents a tool that can be used by ChatGPT in a chat completion.

Inheritors

Types

Link copied to clipboard

Represents a tool that runs Python code on the OpenAI server.

Link copied to clipboard
data class FunctionTool(var function: Function) : Tool

Represents a tool that calls a function.

Link copied to clipboard
data object RetrievalTool : Tool

Represents a tool that retrieves data from uploaded files.

Link copied to clipboard

Represents the type of the tool.

Properties

Link copied to clipboard
abstract val type: Tool.Type

What type of tool this is. This will always match this class's type. For example, for functions: