@firebase/ai 1.3.0 → 1.4.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.
@@ -39,6 +39,12 @@ export declare abstract class Schema implements SchemaInterface {
39
39
  format?: string;
40
40
  /** Optional. The description of the property. */
41
41
  description?: string;
42
+ /** Optional. The items of the property. */
43
+ items?: SchemaInterface;
44
+ /** The minimum number of items (elements) in a schema of type {@link SchemaType.ARRAY}. */
45
+ minItems?: number;
46
+ /** The maximum number of items (elements) in a schema of type {@link SchemaType.ARRAY}. */
47
+ maxItems?: number;
42
48
  /** Optional. Whether the property is nullable. Defaults to false. */
43
49
  nullable: boolean;
44
50
  /** Optional. The example of the property. */
@@ -54,7 +54,12 @@ export declare enum HarmBlockThreshold {
54
54
  /**
55
55
  * All content will be allowed.
56
56
  */
57
- BLOCK_NONE = "BLOCK_NONE"
57
+ BLOCK_NONE = "BLOCK_NONE",
58
+ /**
59
+ * All content will be allowed. This is the same as `BLOCK_NONE`, but the metadata corresponding
60
+ * to the {@link HarmCategory} will not be present in the response.
61
+ */
62
+ OFF = "OFF"
58
63
  }
59
64
  /**
60
65
  * This property is not supported in the Gemini Developer API ({@link GoogleAIBackend}).
@@ -68,7 +68,7 @@ export declare const enum AIErrorCode {
68
68
  INVALID_SCHEMA = "invalid-schema",
69
69
  /** An error occurred due to a missing Firebase API key. */
70
70
  NO_API_KEY = "no-api-key",
71
- /** An error occured due to a missing Firebase app ID. */
71
+ /** An error occurred due to a missing Firebase app ID. */
72
72
  NO_APP_ID = "no-app-id",
73
73
  /** An error occurred due to a model name not being specified during initialization. */
74
74
  NO_MODEL = "no-model",
@@ -76,6 +76,6 @@ export declare const enum AIErrorCode {
76
76
  NO_PROJECT_ID = "no-project-id",
77
77
  /** An error occurred while parsing. */
78
78
  PARSE_FAILED = "parse-failed",
79
- /** An error occured due an attempt to use an unsupported feature. */
79
+ /** An error occurred due an attempt to use an unsupported feature. */
80
80
  UNSUPPORTED = "unsupported"
81
81
  }
@@ -47,18 +47,34 @@ export interface SchemaShared<T> {
47
47
  format?: string;
48
48
  /** Optional. The description of the property. */
49
49
  description?: string;
50
+ /**
51
+ * The title of the property. This helps document the schema's purpose but does not typically
52
+ * constrain the generated value. It can subtly guide the model by clarifying the intent of a
53
+ * field.
54
+ */
55
+ title?: string;
50
56
  /** Optional. The items of the property. */
51
57
  items?: T;
58
+ /** The minimum number of items (elements) in a schema of type {@link SchemaType.ARRAY}. */
59
+ minItems?: number;
60
+ /** The maximum number of items (elements) in a schema of type {@link SchemaType.ARRAY}. */
61
+ maxItems?: number;
52
62
  /** Optional. Map of `Schema` objects. */
53
63
  properties?: {
54
64
  [k: string]: T;
55
65
  };
66
+ /** A hint suggesting the order in which the keys should appear in the generated JSON string. */
67
+ propertyOrdering?: string[];
56
68
  /** Optional. The enum of the property. */
57
69
  enum?: string[];
58
70
  /** Optional. The example of the property. */
59
71
  example?: unknown;
60
72
  /** Optional. Whether the property is nullable. */
61
73
  nullable?: boolean;
74
+ /** The minimum value of a numeric type. */
75
+ minimum?: number;
76
+ /** The maximum value of a numeric type. */
77
+ maximum?: number;
62
78
  [key: string]: unknown;
63
79
  }
64
80
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firebase/ai",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "The Firebase AI SDK",
5
5
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
6
  "engines": {
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "license": "Apache-2.0",
58
58
  "devDependencies": {
59
- "@firebase/app": "0.13.0",
59
+ "@firebase/app": "0.13.1",
60
60
  "@rollup/plugin-json": "6.1.0",
61
61
  "rollup": "2.79.2",
62
62
  "rollup-plugin-replace": "2.2.0",