@firebase/ai 2.5.0-canary.63167c68a → 2.5.0

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.
@@ -15,20 +15,21 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import { FirebaseApp, _FirebaseService } from '@firebase/app';
18
- import { AI, AIOptions, ChromeAdapter, InferenceMode, OnDeviceParams } from './public-types';
18
+ import { AI, AIOptions, InferenceMode, OnDeviceParams } from './public-types';
19
19
  import { AppCheckInternalComponentName, FirebaseAppCheckInternal } from '@firebase/app-check-interop-types';
20
20
  import { Provider } from '@firebase/component';
21
21
  import { FirebaseAuthInternal, FirebaseAuthInternalName } from '@firebase/auth-interop-types';
22
22
  import { Backend } from './backend';
23
+ import { ChromeAdapterImpl } from './methods/chrome-adapter';
23
24
  export declare class AIService implements AI, _FirebaseService {
24
25
  app: FirebaseApp;
25
26
  backend: Backend;
26
- chromeAdapterFactory?: ((mode: InferenceMode, window?: Window, params?: OnDeviceParams) => ChromeAdapter | undefined) | undefined;
27
+ chromeAdapterFactory?: ((mode: InferenceMode, window?: Window, params?: OnDeviceParams) => ChromeAdapterImpl | undefined) | undefined;
27
28
  auth: FirebaseAuthInternal | null;
28
29
  appCheck: FirebaseAppCheckInternal | null;
29
30
  _options?: Omit<AIOptions, 'backend'>;
30
31
  location: string;
31
- constructor(app: FirebaseApp, backend: Backend, authProvider?: Provider<FirebaseAuthInternalName>, appCheckProvider?: Provider<AppCheckInternalComponentName>, chromeAdapterFactory?: ((mode: InferenceMode, window?: Window, params?: OnDeviceParams) => ChromeAdapter | undefined) | undefined);
32
+ constructor(app: FirebaseApp, backend: Backend, authProvider?: Provider<FirebaseAuthInternalName>, appCheckProvider?: Provider<AppCheckInternalComponentName>, chromeAdapterFactory?: ((mode: InferenceMode, window?: Window, params?: OnDeviceParams) => ChromeAdapterImpl | undefined) | undefined);
32
33
  _delete(): Promise<void>;
33
34
  set options(optionsToSet: AIOptions);
34
35
  get options(): AIOptions | undefined;
@@ -14,7 +14,6 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { InferenceMode } from './enums';
18
17
  import { CountTokensRequest, GenerateContentRequest } from './requests';
19
18
  /**
20
19
  * Defines an inference "backend" that uses Chrome's on-device model,
@@ -26,10 +25,6 @@ import { CountTokensRequest, GenerateContentRequest } from './requests';
26
25
  * @beta
27
26
  */
28
27
  export interface ChromeAdapter {
29
- /**
30
- * @internal
31
- */
32
- mode: InferenceMode;
33
28
  /**
34
29
  * Checks if the on-device model is capable of handling a given
35
30
  * request.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firebase/ai",
3
- "version": "2.5.0-canary.63167c68a",
3
+ "version": "2.5.0",
4
4
  "description": "The Firebase AI SDK",
5
5
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
6
  "engines": {
@@ -48,19 +48,19 @@
48
48
  "trusted-type-check": "tsec -p tsconfig.json --noEmit"
49
49
  },
50
50
  "peerDependencies": {
51
- "@firebase/app": "0.14.5-canary.63167c68a",
52
- "@firebase/app-types": "0.9.3-canary.63167c68a"
51
+ "@firebase/app": "0.x",
52
+ "@firebase/app-types": "0.x"
53
53
  },
54
54
  "dependencies": {
55
- "@firebase/app-check-interop-types": "0.3.3-canary.63167c68a",
56
- "@firebase/component": "0.7.0-canary.63167c68a",
57
- "@firebase/logger": "0.5.0-canary.63167c68a",
58
- "@firebase/util": "1.13.0-canary.63167c68a",
55
+ "@firebase/app-check-interop-types": "0.3.3",
56
+ "@firebase/component": "0.7.0",
57
+ "@firebase/logger": "0.5.0",
58
+ "@firebase/util": "1.13.0",
59
59
  "tslib": "^2.1.0"
60
60
  },
61
61
  "license": "Apache-2.0",
62
62
  "devDependencies": {
63
- "@firebase/app": "0.14.5-canary.63167c68a",
63
+ "@firebase/app": "0.14.5",
64
64
  "@rollup/plugin-json": "6.1.0",
65
65
  "rollup": "2.79.2",
66
66
  "rollup-plugin-replace": "2.2.0",
@@ -1,19 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { ComponentContainer, InstanceFactoryOptions } from '@firebase/component';
18
- import { AIService } from './service';
19
- export declare function factory(container: ComponentContainer, { instanceIdentifier }: InstanceFactoryOptions): AIService;
@@ -1,19 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { ComponentContainer, InstanceFactoryOptions } from '@firebase/component';
18
- import { AIService } from './service';
19
- export declare function factory(container: ComponentContainer, { instanceIdentifier }: InstanceFactoryOptions): AIService;