@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.
@@ -8,7 +8,7 @@ var util = require('@firebase/util');
8
8
  var logger$1 = require('@firebase/logger');
9
9
 
10
10
  var name = "@firebase/ai";
11
- var version = "2.1.0-canary.02280d747";
11
+ var version = "2.1.0-canary.2058432e6";
12
12
 
13
13
  /**
14
14
  * @license
@@ -657,12 +657,6 @@ class AIService {
657
657
  _delete() {
658
658
  return Promise.resolve();
659
659
  }
660
- set options(optionsToSet) {
661
- this._options = optionsToSet;
662
- }
663
- get options() {
664
- return this._options;
665
- }
666
660
  }
667
661
 
668
662
  /**
@@ -847,12 +841,7 @@ class AIModel {
847
841
  };
848
842
  }
849
843
  else if (ai.appCheck) {
850
- if (ai.options?.useLimitedUseAppCheckTokens) {
851
- this._apiSettings.getAppCheckToken = () => ai.appCheck.getLimitedUseToken();
852
- }
853
- else {
854
- this._apiSettings.getAppCheckToken = () => ai.appCheck.getToken();
855
- }
844
+ this._apiSettings.getAppCheckToken = () => ai.appCheck.getToken();
856
845
  }
857
846
  if (ai.auth) {
858
847
  this._apiSettings.getAuthToken = () => ai.auth.getToken();
@@ -2974,20 +2963,14 @@ class ImagenImageFormat {
2974
2963
  *
2975
2964
  * @public
2976
2965
  */
2977
- function getAI(app$1 = app.getApp(), options) {
2966
+ function getAI(app$1 = app.getApp(), options = { backend: new GoogleAIBackend() }) {
2978
2967
  app$1 = util.getModularInstance(app$1);
2979
2968
  // Dependencies
2980
2969
  const AIProvider = app._getProvider(app$1, AI_TYPE);
2981
- const backend = options?.backend ?? new GoogleAIBackend();
2982
- const finalOptions = {
2983
- useLimitedUseAppCheckTokens: options?.useLimitedUseAppCheckTokens ?? false
2984
- };
2985
- const identifier = encodeInstanceIdentifier(backend);
2986
- const aiInstance = AIProvider.getImmediate({
2970
+ const identifier = encodeInstanceIdentifier(options.backend);
2971
+ return AIProvider.getImmediate({
2987
2972
  identifier
2988
2973
  });
2989
- aiInstance.options = finalOptions;
2990
- return aiInstance;
2991
2974
  }
2992
2975
  /**
2993
2976
  * Returns a {@link GenerativeModel} class with methods for inference