enhance system prompt to use the name

parent 35352c6d
...@@ -33,7 +33,7 @@ class ChatDatabaseService: ...@@ -33,7 +33,7 @@ class ChatDatabaseService:
with self.conn.cursor(cursor_factory=RealDictCursor) as cur: with self.conn.cursor(cursor_factory=RealDictCursor) as cur:
cur.execute( cur.execute(
""" """
SELECT student_id, grade, language, nationality SELECT student_id, student_name, grade, language, nationality
FROM students FROM students
WHERE student_id = %s WHERE student_id = %s
""", """,
...@@ -43,6 +43,7 @@ class ChatDatabaseService: ...@@ -43,6 +43,7 @@ class ChatDatabaseService:
if result: if result:
return { return {
'student_id': result['student_id'], 'student_id': result['student_id'],
'student_name': result['student_name'], # Added this line
'grade': result['grade'], 'grade': result['grade'],
'is_arabic': result['language'], # Convert language boolean to is_arabic 'is_arabic': result['language'], # Convert language boolean to is_arabic
'nationality': result['nationality'] 'nationality': result['nationality']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment