DeepSeekClient

Client for interacting with the DeepSeek API.

This client provides methods for all DeepSeek API endpoints, including chat completions, embeddings, and other AI capabilities.

Types

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

Builder for configuring and creating DeepSeekClient instances.

Properties

Link copied to clipboard
val client: HttpClient

The underlying HTTP client used for API requests

Link copied to clipboard

Configuration options for the DeepSeek client

Functions

Link copied to clipboard

Sends a chat request with default parameters and a DSL for building messages.

suspend fun DeepSeekClient.chat(message: String): ChatCompletion

Sends a single user message to the chat API.

Sends a chat request with default parameters.

Sends a chat request with custom parameters and a DSL for building messages.

Sends a chat request with custom parameters and messages.

Link copied to clipboard

Sends a fully customizable chat completion request.

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 override fun close()

Closes the underlying HTTP client and releases resources.

Link copied to clipboard

Creates a new client instance with parameters modified via a builder block.

Creates a new client instance with updated parameters.

Link copied to clipboard
suspend fun DeepSeekClient.fim(prompt: String): FIMCompletion

Generates a completion using the Fill-In-the-Middle capability with default parameters.

Generates a completion using the Fill-In-the-Middle capability with custom parameters.

Link copied to clipboard

Creates a fully customizable FIM completion request using a builder pattern.

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 available DeepSeek AI models.

Link copied to clipboard

Retrieves the current user's available API credits and usage information.