@firebase/ai 1.3.0-canary.2fe754727 → 1.3.0-canary.40be2dbb8
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.
- package/dist/ai-public.d.ts +20 -3
- package/dist/ai.d.ts +20 -3
- package/dist/esm/index.esm2017.js +6 -1
- package/dist/esm/index.esm2017.js.map +1 -1
- package/dist/esm/src/types/enums.d.ts +6 -1
- package/dist/esm/src/types/error.d.ts +2 -2
- package/dist/esm/src/types/schema.d.ts +12 -0
- package/dist/index.cjs.js +6 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.node.cjs.js +6 -1
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +6 -1
- package/dist/index.node.mjs.map +1 -1
- package/dist/src/types/enums.d.ts +6 -1
- package/dist/src/types/error.d.ts +2 -2
- package/dist/src/types/schema.d.ts +12 -0
- package/package.json +8 -8
package/dist/ai-public.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ declare const enum AIErrorCode {
|
|
|
75
75
|
INVALID_SCHEMA = "invalid-schema",
|
|
76
76
|
/** An error occurred due to a missing Firebase API key. */
|
|
77
77
|
NO_API_KEY = "no-api-key",
|
|
78
|
-
/** An error
|
|
78
|
+
/** An error occurred due to a missing Firebase app ID. */
|
|
79
79
|
NO_APP_ID = "no-app-id",
|
|
80
80
|
/** An error occurred due to a model name not being specified during initialization. */
|
|
81
81
|
NO_MODEL = "no-model",
|
|
@@ -83,7 +83,7 @@ declare const enum AIErrorCode {
|
|
|
83
83
|
NO_PROJECT_ID = "no-project-id",
|
|
84
84
|
/** An error occurred while parsing. */
|
|
85
85
|
PARSE_FAILED = "parse-failed",
|
|
86
|
-
/** An error
|
|
86
|
+
/** An error occurred due an attempt to use an unsupported feature. */
|
|
87
87
|
UNSUPPORTED = "unsupported"
|
|
88
88
|
}
|
|
89
89
|
export { AIErrorCode }
|
|
@@ -918,7 +918,12 @@ export declare enum HarmBlockThreshold {
|
|
|
918
918
|
/**
|
|
919
919
|
* All content will be allowed.
|
|
920
920
|
*/
|
|
921
|
-
BLOCK_NONE = "BLOCK_NONE"
|
|
921
|
+
BLOCK_NONE = "BLOCK_NONE",
|
|
922
|
+
/**
|
|
923
|
+
* All content will be allowed. This is the same as `BLOCK_NONE`, but the metadata corresponding
|
|
924
|
+
* to the {@link HarmCategory} will not be present in the response.
|
|
925
|
+
*/
|
|
926
|
+
OFF = "OFF"
|
|
922
927
|
}
|
|
923
928
|
|
|
924
929
|
/**
|
|
@@ -1750,18 +1755,30 @@ export declare interface SchemaShared<T> {
|
|
|
1750
1755
|
format?: string;
|
|
1751
1756
|
/** Optional. The description of the property. */
|
|
1752
1757
|
description?: string;
|
|
1758
|
+
/**
|
|
1759
|
+
* The title of the property. This helps document the schema's purpose but does not typically
|
|
1760
|
+
* constrain the generated value. It can subtly guide the model by clarifying the intent of a
|
|
1761
|
+
* field.
|
|
1762
|
+
*/
|
|
1763
|
+
title?: string;
|
|
1753
1764
|
/** Optional. The items of the property. */
|
|
1754
1765
|
items?: T;
|
|
1755
1766
|
/** Optional. Map of `Schema` objects. */
|
|
1756
1767
|
properties?: {
|
|
1757
1768
|
[k: string]: T;
|
|
1758
1769
|
};
|
|
1770
|
+
/** A hint suggesting the order in which the keys should appear in the generated JSON string. */
|
|
1771
|
+
propertyOrdering?: string[];
|
|
1759
1772
|
/** Optional. The enum of the property. */
|
|
1760
1773
|
enum?: string[];
|
|
1761
1774
|
/** Optional. The example of the property. */
|
|
1762
1775
|
example?: unknown;
|
|
1763
1776
|
/** Optional. Whether the property is nullable. */
|
|
1764
1777
|
nullable?: boolean;
|
|
1778
|
+
/** The minimum value of a numeric type. */
|
|
1779
|
+
minimum?: number;
|
|
1780
|
+
/** The maximum value of a numeric type. */
|
|
1781
|
+
maximum?: number;
|
|
1765
1782
|
[key: string]: unknown;
|
|
1766
1783
|
}
|
|
1767
1784
|
|
package/dist/ai.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ declare const enum AIErrorCode {
|
|
|
75
75
|
INVALID_SCHEMA = "invalid-schema",
|
|
76
76
|
/** An error occurred due to a missing Firebase API key. */
|
|
77
77
|
NO_API_KEY = "no-api-key",
|
|
78
|
-
/** An error
|
|
78
|
+
/** An error occurred due to a missing Firebase app ID. */
|
|
79
79
|
NO_APP_ID = "no-app-id",
|
|
80
80
|
/** An error occurred due to a model name not being specified during initialization. */
|
|
81
81
|
NO_MODEL = "no-model",
|
|
@@ -83,7 +83,7 @@ declare const enum AIErrorCode {
|
|
|
83
83
|
NO_PROJECT_ID = "no-project-id",
|
|
84
84
|
/** An error occurred while parsing. */
|
|
85
85
|
PARSE_FAILED = "parse-failed",
|
|
86
|
-
/** An error
|
|
86
|
+
/** An error occurred due an attempt to use an unsupported feature. */
|
|
87
87
|
UNSUPPORTED = "unsupported"
|
|
88
88
|
}
|
|
89
89
|
export { AIErrorCode }
|
|
@@ -989,7 +989,12 @@ export declare enum HarmBlockThreshold {
|
|
|
989
989
|
/**
|
|
990
990
|
* All content will be allowed.
|
|
991
991
|
*/
|
|
992
|
-
BLOCK_NONE = "BLOCK_NONE"
|
|
992
|
+
BLOCK_NONE = "BLOCK_NONE",
|
|
993
|
+
/**
|
|
994
|
+
* All content will be allowed. This is the same as `BLOCK_NONE`, but the metadata corresponding
|
|
995
|
+
* to the {@link HarmCategory} will not be present in the response.
|
|
996
|
+
*/
|
|
997
|
+
OFF = "OFF"
|
|
993
998
|
}
|
|
994
999
|
|
|
995
1000
|
/**
|
|
@@ -1848,18 +1853,30 @@ export declare interface SchemaShared<T> {
|
|
|
1848
1853
|
format?: string;
|
|
1849
1854
|
/** Optional. The description of the property. */
|
|
1850
1855
|
description?: string;
|
|
1856
|
+
/**
|
|
1857
|
+
* The title of the property. This helps document the schema's purpose but does not typically
|
|
1858
|
+
* constrain the generated value. It can subtly guide the model by clarifying the intent of a
|
|
1859
|
+
* field.
|
|
1860
|
+
*/
|
|
1861
|
+
title?: string;
|
|
1851
1862
|
/** Optional. The items of the property. */
|
|
1852
1863
|
items?: T;
|
|
1853
1864
|
/** Optional. Map of `Schema` objects. */
|
|
1854
1865
|
properties?: {
|
|
1855
1866
|
[k: string]: T;
|
|
1856
1867
|
};
|
|
1868
|
+
/** A hint suggesting the order in which the keys should appear in the generated JSON string. */
|
|
1869
|
+
propertyOrdering?: string[];
|
|
1857
1870
|
/** Optional. The enum of the property. */
|
|
1858
1871
|
enum?: string[];
|
|
1859
1872
|
/** Optional. The example of the property. */
|
|
1860
1873
|
example?: unknown;
|
|
1861
1874
|
/** Optional. Whether the property is nullable. */
|
|
1862
1875
|
nullable?: boolean;
|
|
1876
|
+
/** The minimum value of a numeric type. */
|
|
1877
|
+
minimum?: number;
|
|
1878
|
+
/** The maximum value of a numeric type. */
|
|
1879
|
+
maximum?: number;
|
|
1863
1880
|
[key: string]: unknown;
|
|
1864
1881
|
}
|
|
1865
1882
|
|
|
@@ -5,7 +5,7 @@ import { Logger } from '@firebase/logger';
|
|
|
5
5
|
import { __asyncGenerator, __await } from 'tslib';
|
|
6
6
|
|
|
7
7
|
var name = "@firebase/ai";
|
|
8
|
-
var version = "1.3.0-canary.
|
|
8
|
+
var version = "1.3.0-canary.40be2dbb8";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
|
@@ -85,6 +85,11 @@ var HarmBlockThreshold;
|
|
|
85
85
|
* All content will be allowed.
|
|
86
86
|
*/
|
|
87
87
|
HarmBlockThreshold["BLOCK_NONE"] = "BLOCK_NONE";
|
|
88
|
+
/**
|
|
89
|
+
* All content will be allowed. This is the same as `BLOCK_NONE`, but the metadata corresponding
|
|
90
|
+
* to the {@link HarmCategory} will not be present in the response.
|
|
91
|
+
*/
|
|
92
|
+
HarmBlockThreshold["OFF"] = "OFF";
|
|
88
93
|
})(HarmBlockThreshold || (HarmBlockThreshold = {}));
|
|
89
94
|
/**
|
|
90
95
|
* This property is not supported in the Gemini Developer API ({@link GoogleAIBackend}).
|