Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lowercase SchemaType enum values #229

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/warm-mails-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@google/generative-ai": minor
---

Use lowercase SchemaType enum values to match json-schema.
12 changes: 6 additions & 6 deletions common/api-review/generative-ai-server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,12 @@ export interface Schema {

// @public
export enum SchemaType {
ARRAY = "ARRAY",
BOOLEAN = "BOOLEAN",
INTEGER = "INTEGER",
NUMBER = "NUMBER",
OBJECT = "OBJECT",
STRING = "STRING"
ARRAY = "array",
BOOLEAN = "boolean",
INTEGER = "integer",
NUMBER = "number",
OBJECT = "object",
STRING = "string"
}

// @public
Expand Down
12 changes: 6 additions & 6 deletions common/api-review/generative-ai.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,12 @@ export interface Schema {

// @public
export enum SchemaType {
ARRAY = "ARRAY",
BOOLEAN = "BOOLEAN",
INTEGER = "INTEGER",
NUMBER = "NUMBER",
OBJECT = "OBJECT",
STRING = "STRING"
ARRAY = "array",
BOOLEAN = "boolean",
INTEGER = "integer",
NUMBER = "number",
OBJECT = "object",
STRING = "string"
}

// @public
Expand Down
12 changes: 6 additions & 6 deletions docs/reference/main/generative-ai.schematype.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export declare enum SchemaType

| Member | Value | Description |
| --- | --- | --- |
| ARRAY | <code>&quot;ARRAY&quot;</code> | Array type. |
| BOOLEAN | <code>&quot;BOOLEAN&quot;</code> | Boolean type. |
| INTEGER | <code>&quot;INTEGER&quot;</code> | Integer type. |
| NUMBER | <code>&quot;NUMBER&quot;</code> | Number type. |
| OBJECT | <code>&quot;OBJECT&quot;</code> | Object type. |
| STRING | <code>&quot;STRING&quot;</code> | String type. |
| ARRAY | <code>&quot;array&quot;</code> | Array type. |
| BOOLEAN | <code>&quot;boolean&quot;</code> | Boolean type. |
| INTEGER | <code>&quot;integer&quot;</code> | Integer type. |
| NUMBER | <code>&quot;number&quot;</code> | Number type. |
| OBJECT | <code>&quot;object&quot;</code> | Object type. |
| STRING | <code>&quot;string&quot;</code> | String type. |

12 changes: 6 additions & 6 deletions docs/reference/server/generative-ai.schematype.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export declare enum SchemaType

| Member | Value | Description |
| --- | --- | --- |
| ARRAY | <code>&quot;ARRAY&quot;</code> | Array type. |
| BOOLEAN | <code>&quot;BOOLEAN&quot;</code> | Boolean type. |
| INTEGER | <code>&quot;INTEGER&quot;</code> | Integer type. |
| NUMBER | <code>&quot;NUMBER&quot;</code> | Number type. |
| OBJECT | <code>&quot;OBJECT&quot;</code> | Object type. |
| STRING | <code>&quot;STRING&quot;</code> | String type. |
| ARRAY | <code>&quot;array&quot;</code> | Array type. |
| BOOLEAN | <code>&quot;boolean&quot;</code> | Boolean type. |
| INTEGER | <code>&quot;integer&quot;</code> | Integer type. |
| NUMBER | <code>&quot;number&quot;</code> | Number type. |
| OBJECT | <code>&quot;object&quot;</code> | Object type. |
| STRING | <code>&quot;string&quot;</code> | String type. |

12 changes: 6 additions & 6 deletions types/function-calling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,17 @@ export declare interface FunctionDeclarationsTool {
*/
export enum SchemaType {
/** String type. */
STRING = "STRING",
STRING = "string",
/** Number type. */
NUMBER = "NUMBER",
NUMBER = "number",
/** Integer type. */
INTEGER = "INTEGER",
INTEGER = "integer",
/** Boolean type. */
BOOLEAN = "BOOLEAN",
BOOLEAN = "boolean",
/** Array type. */
ARRAY = "ARRAY",
ARRAY = "array",
/** Object type. */
OBJECT = "OBJECT",
OBJECT = "object",
}

/**
Expand Down
Loading