OpenAIConfig

Configuration class for OpenAI integration, providing options to set API-specific paths, network timeouts, and base connection settings.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

The base URL for the OpenAI API. This property defines the endpoint that the client connects to for making API requests. It is used to construct the full URL for various API operations such as chat completions, embeddings, and moderations.

Link copied to clipboard

Represents the API path segment used for OpenAI's chat completions endpoint.

Link copied to clipboard

Specifies the API path for embedding operations in the OpenAI API.

Link copied to clipboard

Represents the HTTP client used for making network requests to the OpenAI API. This client is configurable and can be replaced or customized to meet specific requirements, such as adjusting timeouts, adding interceptors, or modifying base client behavior. The default implementation initializes with a standard HttpClient instance.

Link copied to clipboard
val moderationsPath: String? = null

Represents the API path for the moderation endpoint used in OpenAI API requests. This is a constant value and is typically appended to the base URL when making requests to moderation-related services.

Link copied to clipboard

A configuration property that defines timeout settings for network interactions with the OpenAI API. It specifies limits for request execution time, connection establishment time, and socket operation time. These timeout values are represented in Duration and provide control over handling delayed or unresponsive network operations.

Functions

Link copied to clipboard

Configures custom timeout settings for the OpenAI API client.