configure
Creates a new client instance with updated parameters.
This function allows you to create a new client with modified parameters while preserving all other configuration settings from the original client.
Example:
// Original client
val client = DeepSeekClient("your-api-token")
// Create a new client with modified parameters
val customParams = ChatCompletionParams(ChatModel.DEEPSEEK_CHAT)
val configuredClient = client.configure(customParams)
Content copied to clipboard
Return
A new DeepSeekClient with updated parameters
Parameters
params
The new parameters to use for this client instance
Creates a new client instance with parameters modified via a builder block.
This function provides a convenient way to create a new client with customized parameters using a Kotlin DSL builder pattern.
Example:
// Create a new client with custom parameters
val configuredClient = client.configure {
chat {
temperature = 0.8
maxTokens = 2000
topP = 0.95
}
}
Content copied to clipboard
Return
A new DeepSeekClient with the updated parameters
Parameters
block
A builder block for modifying parameters