Skip to content

Commit 685ccc8

Browse files
committed
Fix AI and modify wording for timetable limit on Homepage
1 parent b2fae58 commit 685ccc8

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

course-matrix/backend/src/constants/availableFunctions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export const availableFunctions: AvailableFunctions = {
4040
try {
4141
// Retrieve user_id
4242
const user_id = (req as any).user.id;
43-
console.log("NO");
4443
// Retrieve user timetable item based on user_id
4544
let timeTableQuery = supabase
4645
.schema("timetable")

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ export const chat = asyncHandler(async (req: Request, res: Response) => {
249249
- Create new timetables based on provided courses and restrictions
250250
- Update timetable names and semesters
251251
- Delete a user's timetables
252-
- Retrieve timetables that the user owns, THIS INFORMATION MUST BE REFRESHED OFTEN!!!
253-
- Retrieve the number of timetables that the user owns. THIS SHOULD NOT EXCEED 25!
252+
- Retrieve timetables that the user owns
254253
255254
## Response Guidelines
256255
- Be concise and direct when answering course-related questions
@@ -261,7 +260,6 @@ export const chat = asyncHandler(async (req: Request, res: Response) => {
261260
- Format long lists of timetables as a table
262261
263262
## Tool call guidelines
264-
- call getTimetables no matter what, to obtain the most of to date # of timetables for the user.
265263
- Include the timetable ID in all getTimetables tool call responses
266264
- Link: For every tool call, for each timetable that it gets/deletes/modifies/creates, include a link with it displayed as "View Timetable" to ${
267265
process.env.CLIENT_APP_URL
@@ -276,6 +274,7 @@ export const chat = asyncHandler(async (req: Request, res: Response) => {
276274
- After a deletion has been cancelled, /timetable confirm will do nothing. If the user wants to delete again after cancelling, they must specify so.
277275
- Do not create multiple timetables for a single user query. Each user query can create at most 1 timetable
278276
- 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
277+
- It is possible for users to delete timetables / update them manually. For this reason, always refetch getTimtables before creation, to get the latest names and timetable count. Do not assume the timetables are the same since the last query.
279278
`,
280279
messages,
281280
tools: {

course-matrix/frontend/src/pages/Home/Home.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ const Home = () => {
4949

5050
<h1
5151
className={`${
52-
count >= 25 ? "font-bold text-red-500" : "font-normal text-black"
52+
count >= 25 ? "text-sm font-bold text-red-500" : "text-sm font-normal text-black"
5353
}`}
5454
>
5555
{" "}
56-
(Timetable limit: {count}/25)
56+
(Created timetables: {count}/25)
5757
</h1>
5858
</div>
5959
<TimetableErrorDialog

0 commit comments

Comments
 (0)