DeepSeekClientBase

abstract class DeepSeekClientBase(client: HttpClient, val config: DeepSeekClientConfig)

Base class for DeepSeek API clients providing core functionality.

This abstract class serves as a foundation for both standard and streaming DeepSeek clients, handling HTTP interactions and common configuration.

The client is designed to be long-lived: create one instance and reuse it for the lifetime of your application. The underlying HTTP client automatically releases idle connections and threads, so calling close is usually unnecessary.

Inheritors

Constructors

Link copied to clipboard
constructor(client: HttpClient, config: DeepSeekClientConfig)

Types

Link copied to clipboard
abstract class Builder(token: String? = null)

Base builder class for configuring DeepSeek clients.

Properties

Link copied to clipboard

Configuration options for the DeepSeek client

Functions

Link copied to clipboard

Sends a chat completion request to the DeepSeek API.

Link copied to clipboard

Streams chat completion responses chunk by chunk from the DeepSeek API.

Link copied to clipboard
open fun close()

Closes the underlying HTTP client and releases its resources.

Link copied to clipboard
open suspend fun closeAndJoin()

Closes the underlying HTTP client and suspends until its coroutine scope completes.

Link copied to clipboard

Sends a Fill-In-the-Middle (FIM) completion request to the DeepSeek API.

Link copied to clipboard

Streams Fill-In-the-Middle (FIM) completions chunk by chunk from the DeepSeek API.

Link copied to clipboard

Retrieves the list of DeepSeek models available for the current API key.

Link copied to clipboard

Retrieves the current user's available API balance.