@firebase/ai 2.1.0-canary.02280d747 → 2.1.0-canary.2058432e6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ import { FirebaseError, getModularInstance } from '@firebase/util';
4
4
  import { Logger } from '@firebase/logger';
5
5
 
6
6
  var name = "@firebase/ai";
7
- var version = "2.1.0-canary.02280d747";
7
+ var version = "2.1.0-canary.2058432e6";
8
8
 
9
9
  /**
10
10
  * @license
@@ -653,12 +653,6 @@ class AIService {
653
653
  _delete() {
654
654
  return Promise.resolve();
655
655
  }
656
- set options(optionsToSet) {
657
- this._options = optionsToSet;
658
- }
659
- get options() {
660
- return this._options;
661
- }
662
656
  }
663
657
 
664
658
  /**
@@ -843,12 +837,7 @@ class AIModel {
843
837
  };
844
838
  }
845
839
  else if (ai.appCheck) {
846
- if (ai.options?.useLimitedUseAppCheckTokens) {
847
- this._apiSettings.getAppCheckToken = () => ai.appCheck.getLimitedUseToken();
848
- }
849
- else {
850
- this._apiSettings.getAppCheckToken = () => ai.appCheck.getToken();
851
- }
840
+ this._apiSettings.getAppCheckToken = () => ai.appCheck.getToken();
852
841
  }
853
842
  if (ai.auth) {
854
843
  this._apiSettings.getAuthToken = () => ai.auth.getToken();
@@ -2970,20 +2959,14 @@ class ImagenImageFormat {
2970
2959
  *
2971
2960
  * @public
2972
2961
  */
2973
- function getAI(app = getApp(), options) {
2962
+ function getAI(app = getApp(), options = { backend: new GoogleAIBackend() }) {
2974
2963
  app = getModularInstance(app);
2975
2964
  // Dependencies
2976
2965
  const AIProvider = _getProvider(app, AI_TYPE);
2977
- const backend = options?.backend ?? new GoogleAIBackend();
2978
- const finalOptions = {
2979
- useLimitedUseAppCheckTokens: options?.useLimitedUseAppCheckTokens ?? false
2980
- };
2981
- const identifier = encodeInstanceIdentifier(backend);
2982
- const aiInstance = AIProvider.getImmediate({
2966
+ const identifier = encodeInstanceIdentifier(options.backend);
2967
+ return AIProvider.getImmediate({
2983
2968
  identifier
2984
2969
  });
2985
- aiInstance.options = finalOptions;
2986
- return aiInstance;
2987
2970
  }
2988
2971
  /**
2989
2972
  * Returns a {@link GenerativeModel} class with methods for inference