INNER CODE UNIT · Dart

apiKey

anasfik/openai · lib/src/instance/openai.dart:146

  static set apiKey(String apiKey) {
    HeadersBuilder.apiKey = apiKey;
    _internalApiKey = apiKey;
  }

  /// This is used to set the base url of the OpenAI API, by default it is set to [OpenAIConfig.baseUrl].
  static set baseUrl(String baseUrl) {
    OpenAIConfig.baseUrl = baseUrl;
  }

  static set baseUrlVersion(String version) {
    OpenAIConfig.version = version;
  }

  /// If you have multiple organizations, you can set it's id with this.
  /// once this is set, it will be used in all the requests to the OpenAI API.
  ///
  /// Example:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…