Skip to content

Commit 24e17ea

Browse files
committed
Fix chatbot handling duplic
1 parent 7867446 commit 24e17ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

course-matrix/backend/src/controllers/aiController.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ export const chat = asyncHandler(async (req: Request, res: Response) => {
257257
- Do not make up fake courses or offerings.
258258
- For delete timetable requests, ask for user confirmation with command "/timetable confirm" before proceeding
259259
- Do not create multiple timetables for a single user query. Each user query can create at most 1 timetable
260+
- If you try to update or create a timetable but you get an error saying a timetable with the same name already exists, then ask the user to rename
260261
`,
261262
messages,
262263
tools: {
@@ -295,7 +296,7 @@ export const chat = asyncHandler(async (req: Request, res: Response) => {
295296
"Return a list of possible timetables based on provided courses and restrictions.",
296297
parameters: TimetableFormSchema,
297298
execute: async (args) => {
298-
// console.log("Args for generate: ", args)
299+
console.log("Args for generate: ", args)
299300
console.log("restrictions :", JSON.stringify(args.restrictions));
300301
const data = await availableFunctions.generateTimetable(
301302
args,

0 commit comments

Comments
 (0)