withExtensions method

LLMConfig withExtensions(
  1. Map<String, dynamic> newExtensions
)

Create a new config with additional extensions

Implementation

LLMConfig withExtensions(Map<String, dynamic> newExtensions) {
  return LLMConfig(
    apiKey: apiKey,
    baseUrl: baseUrl,
    model: model,
    maxTokens: maxTokens,
    temperature: temperature,
    systemPrompt: systemPrompt,
    timeout: timeout,
    topP: topP,
    topK: topK,
    tools: tools,
    toolChoice: toolChoice,
    stopSequences: stopSequences,
    user: user,
    serviceTier: serviceTier,
    extensions: {...extensions, ...newExtensions},
  );
}