DeepSeekConfig.fromLLMConfig constructor

DeepSeekConfig.fromLLMConfig(
  1. LLMConfig config
)

Create DeepSeekConfig from unified LLMConfig

Implementation

factory DeepSeekConfig.fromLLMConfig(LLMConfig config) {
  return DeepSeekConfig(
    apiKey: config.apiKey!,
    baseUrl: config.baseUrl,
    model: config.model,
    maxTokens: config.maxTokens,
    temperature: config.temperature,
    systemPrompt: config.systemPrompt,
    timeout: config.timeout,
    topP: config.topP,
    topK: config.topK,
    tools: config.tools,
    toolChoice: config.toolChoice,
    // DeepSeek-specific parameters from extensions
    logprobs: config.getExtension<bool>('logprobs'),
    topLogprobs: config.getExtension<int>('top_logprobs'),
    frequencyPenalty: config.getExtension<double>('frequency_penalty'),
    presencePenalty: config.getExtension<double>('presence_penalty'),
    responseFormat:
        config.getExtension<Map<String, dynamic>>('response_format'),
    originalConfig: config,
  );
}