OpenRouterClient constructor

OpenRouterClient({
  1. required String apiKey,
  2. required String model,
  3. String? siteUrl,
  4. String? siteName,
  5. double? temperature,
  6. int? maxCompletionTokens,
  7. double? topP,
  8. String? reasoningEffort,
  9. dynamic stop,
  10. void onRetry(
    1. int attempt,
    2. Duration nextDelay,
    3. dynamic error
    )?,
  11. Client? httpClient,
})

Creates an OpenRouterClient with the specified configuration.

Implementation

OpenRouterClient({
  required this.apiKey,
  required this.model,
  this.siteUrl,
  this.siteName,
  this.temperature,
  this.maxCompletionTokens,
  this.topP,
  this.reasoningEffort,
  this.stop,
  this.onRetry,
  http.Client? httpClient,
}) : _httpClient = httpClient ?? http.Client();