Skip to content

Commit 08c27a7

Browse files
committed
fix required fields and add enum property
The Schema object should use the enum property and the required field had a typo that made gemini not recognize it
1 parent 8b2d455 commit 08c27a7

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Diff for: package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@angular/platform-browser": "^18.0.4",
1919
"@angular/platform-browser-dynamic": "^18.0.4",
2020
"@angular/router": "^18.0.4",
21-
"@google/generative-ai": "^0.8.0",
21+
"@google/generative-ai": "^0.14.1",
2222
"rxjs": "~7.8.0",
2323
"tslib": "^2.3.0",
2424
"zone.js": "~0.14.2"

Diff for: src/app/gemini-function-declarations.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const columnNameSchema: FunctionDeclarationSchemaProperty = {
3131
const columnTypeSchema: FunctionDeclarationSchemaProperty = {
3232
type: FunctionDeclarationSchemaType.STRING,
3333
nullable: false,
34+
format: "enum",
3435
enum: [...ColumnTypeValues],
3536
description:
3637
"Column type. Specifies the type of data that can be stored in this column.",
@@ -45,7 +46,7 @@ const columnSchema: FunctionDeclarationSchema = {
4546
type: FunctionDeclarationSchemaType.OBJECT,
4647
description: "Table column. Specifies the properties of a table column.",
4748
properties: tableColumnProperties,
48-
required: ["columnName, columnType"],
49+
required: ["columnName", "columnType"],
4950
};
5051

5152
const columnsSchema: FunctionDeclarationSchemaProperty = {

0 commit comments

Comments
 (0)