DeepSeekClient

fun DeepSeekClient(token: String? = null, block: DeepSeekClient.Builder.() -> Unit = {}): DeepSeekClient

Creates a new instance of DeepSeekClient with optional configuration.

This constructor function allows creating a client with minimal setup using a token, or with advanced configuration via the block parameter.

Example:

// Simple client with API token
val client = DeepSeekClient("your-api-token")

// Client with custom configuration
val customClient = DeepSeekClient("your-api-token") {
chatCompletionTimeout(60000)
jsonConfig { prettyPrint = false }
}

Return

A new DeepSeekClient instance

Parameters

token

The DeepSeek API token for authentication

block

Configuration block for additional customization