Skip to content

Commit e597f67

Browse files
committed
require function calling
1 parent c97b23f commit e597f67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/gemini.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
import { Injectable } from "@angular/core";
16-
import { GenerativeModel, GoogleGenerativeAI } from "@google/generative-ai";
16+
import { FunctionCallingMode, GenerativeModel, GoogleGenerativeAI } from "@google/generative-ai";
1717
import { DatabaseService } from "./database.service";
1818
import { functionDeclarations } from "./gemini-function-declarations";
1919
import { LogService } from "./log.service";
@@ -70,8 +70,8 @@ export class GeminiService {
7070
this.model.toolConfig = {
7171
functionCallingConfig: {
7272
// Require function calling response.
73-
// mode: FunctionCallingMode.ANY,
74-
// allowedFunctionNames: ["createTable", "alterTable"],
73+
mode: FunctionCallingMode.ANY,
74+
allowedFunctionNames: ["createTable", "alterTable"],
7575
}
7676
};
7777

0 commit comments

Comments
 (0)