@firebase/ai 2.1.0-canary.44d8d742f → 2.1.0-firebase-studio-sdk-integration.f7536090e

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.
@@ -320,16 +320,18 @@ export declare interface ChromeAdapter {
320
320
  /**
321
321
  * Generates content using on-device inference.
322
322
  *
323
- * <p>This is comparable to {@link GenerativeModel.generateContent} for generating
324
- * content using in-cloud inference.</p>
323
+ * @remarks
324
+ * This is comparable to {@link GenerativeModel.generateContent} for generating
325
+ * content using in-cloud inference.
325
326
  * @param request - a standard Firebase AI {@link GenerateContentRequest}
326
327
  */
327
328
  generateContent(request: GenerateContentRequest): Promise<Response>;
328
329
  /**
329
330
  * Generates a content stream using on-device inference.
330
331
  *
331
- * <p>This is comparable to {@link GenerativeModel.generateContentStream} for generating
332
- * a content stream using in-cloud inference.</p>
332
+ * @remarks
333
+ * This is comparable to {@link GenerativeModel.generateContentStream} for generating
334
+ * a content stream using in-cloud inference.
333
335
  * @param request - a standard Firebase AI {@link GenerateContentRequest}
334
336
  */
335
337
  generateContentStream(request: GenerateContentRequest): Promise<Response>;
@@ -1904,7 +1906,10 @@ export declare interface RequestOptions {
1904
1906
  */
1905
1907
  timeout?: number;
1906
1908
  /**
1907
- * Base url for endpoint. Defaults to https://firebasevertexai.googleapis.com
1909
+ * Base url for endpoint. Defaults to
1910
+ * https://firebasevertexai.googleapis.com, which is the
1911
+ * {@link https://console.cloud.google.com/apis/library/firebasevertexai.googleapis.com?project=_ | Firebase AI Logic API}
1912
+ * (used regardless of your chosen Gemini API provider).
1908
1913
  */
1909
1914
  baseUrl?: string;
1910
1915
  }
package/dist/ai.d.ts CHANGED
@@ -360,16 +360,18 @@ export declare interface ChromeAdapter {
360
360
  /**
361
361
  * Generates content using on-device inference.
362
362
  *
363
- * <p>This is comparable to {@link GenerativeModel.generateContent} for generating
364
- * content using in-cloud inference.</p>
363
+ * @remarks
364
+ * This is comparable to {@link GenerativeModel.generateContent} for generating
365
+ * content using in-cloud inference.
365
366
  * @param request - a standard Firebase AI {@link GenerateContentRequest}
366
367
  */
367
368
  generateContent(request: GenerateContentRequest): Promise<Response>;
368
369
  /**
369
370
  * Generates a content stream using on-device inference.
370
371
  *
371
- * <p>This is comparable to {@link GenerativeModel.generateContentStream} for generating
372
- * a content stream using in-cloud inference.</p>
372
+ * @remarks
373
+ * This is comparable to {@link GenerativeModel.generateContentStream} for generating
374
+ * a content stream using in-cloud inference.
373
375
  * @param request - a standard Firebase AI {@link GenerateContentRequest}
374
376
  */
375
377
  generateContentStream(request: GenerateContentRequest): Promise<Response>;
@@ -2003,7 +2005,10 @@ export declare interface RequestOptions {
2003
2005
  */
2004
2006
  timeout?: number;
2005
2007
  /**
2006
- * Base url for endpoint. Defaults to https://firebasevertexai.googleapis.com
2008
+ * Base url for endpoint. Defaults to
2009
+ * https://firebasevertexai.googleapis.com, which is the
2010
+ * {@link https://console.cloud.google.com/apis/library/firebasevertexai.googleapis.com?project=_ | Firebase AI Logic API}
2011
+ * (used regardless of your chosen Gemini API provider).
2007
2012
  */
2008
2013
  baseUrl?: string;
2009
2014
  }
@@ -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.44d8d742f";
7
+ var version = "2.1.0-firebase-studio-sdk-integration.f7536090e";
8
8
 
9
9
  /**
10
10
  * @license
@@ -2369,17 +2369,17 @@ class ChromeAdapterImpl {
2369
2369
  /**
2370
2370
  * Checks if a given request can be made on-device.
2371
2371
  *
2372
- * <ol>Encapsulates a few concerns:
2373
- * <li>the mode</li>
2374
- * <li>API existence</li>
2375
- * <li>prompt formatting</li>
2376
- * <li>model availability, including triggering download if necessary</li>
2377
- * </ol>
2372
+ * Encapsulates a few concerns:
2373
+ * the mode
2374
+ * API existence
2375
+ * prompt formatting
2376
+ * model availability, including triggering download if necessary
2378
2377
  *
2379
- * <p>Pros: callers needn't be concerned with details of on-device availability.</p>
2380
- * <p>Cons: this method spans a few concerns and splits request validation from usage.
2378
+ *
2379
+ * Pros: callers needn't be concerned with details of on-device availability.</p>
2380
+ * Cons: this method spans a few concerns and splits request validation from usage.
2381
2381
  * If instance variables weren't already part of the API, we could consider a better
2382
- * separation of concerns.</p>
2382
+ * separation of concerns.
2383
2383
  */
2384
2384
  async isAvailable(request) {
2385
2385
  if (!this.mode) {
@@ -2420,8 +2420,9 @@ class ChromeAdapterImpl {
2420
2420
  /**
2421
2421
  * Generates content on device.
2422
2422
  *
2423
- * <p>This is comparable to {@link GenerativeModel.generateContent} for generating content in
2424
- * Cloud.</p>
2423
+ * @remarks
2424
+ * This is comparable to {@link GenerativeModel.generateContent} for generating content in
2425
+ * Cloud.
2425
2426
  * @param request - a standard Firebase AI {@link GenerateContentRequest}
2426
2427
  * @returns {@link Response}, so we can reuse common response formatting.
2427
2428
  */
@@ -2434,8 +2435,9 @@ class ChromeAdapterImpl {
2434
2435
  /**
2435
2436
  * Generates content stream on device.
2436
2437
  *
2437
- * <p>This is comparable to {@link GenerativeModel.generateContentStream} for generating content in
2438
- * Cloud.</p>
2438
+ * @remarks
2439
+ * This is comparable to {@link GenerativeModel.generateContentStream} for generating content in
2440
+ * Cloud.
2439
2441
  * @param request - a standard Firebase AI {@link GenerateContentRequest}
2440
2442
  * @returns {@link Response}, so we can reuse common response formatting.
2441
2443
  */
@@ -2486,11 +2488,11 @@ class ChromeAdapterImpl {
2486
2488
  /**
2487
2489
  * Triggers out-of-band download of an on-device model.
2488
2490
  *
2489
- * <p>Chrome only downloads models as needed. Chrome knows a model is needed when code calls
2490
- * LanguageModel.create.</p>
2491
+ * Chrome only downloads models as needed. Chrome knows a model is needed when code calls
2492
+ * LanguageModel.create.
2491
2493
  *
2492
- * <p>Since Chrome manages the download, the SDK can only avoid redundant download requests by
2493
- * tracking if a download has previously been requested.</p>
2494
+ * Since Chrome manages the download, the SDK can only avoid redundant download requests by
2495
+ * tracking if a download has previously been requested.
2494
2496
  */
2495
2497
  download() {
2496
2498
  if (this.isDownloading) {
@@ -2544,12 +2546,12 @@ class ChromeAdapterImpl {
2544
2546
  /**
2545
2547
  * Abstracts Chrome session creation.
2546
2548
  *
2547
- * <p>Chrome uses a multi-turn session for all inference. Firebase AI uses single-turn for all
2549
+ * Chrome uses a multi-turn session for all inference. Firebase AI uses single-turn for all
2548
2550
  * inference. To map the Firebase AI API to Chrome's API, the SDK creates a new session for all
2549
- * inference.</p>
2551
+ * inference.
2550
2552
  *
2551
- * <p>Chrome will remove a model from memory if it's no longer in use, so this method ensures a
2552
- * new session is created before an old session is destroyed.</p>
2553
+ * Chrome will remove a model from memory if it's no longer in use, so this method ensures a
2554
+ * new session is created before an old session is destroyed.
2553
2555
  */
2554
2556
  async createSession() {
2555
2557
  if (!this.languageModelProvider) {