Student Attendance Chatbot with Parallel Function Calling

In the previous post, I created a chatbot that interacts with the database to take attendance. One of the issues with my Student Attendance Chatbot (Version 3) (opens in a new tab) is that it could not generate multiple function calls in response to a complex user message. For example, if I enter "mark everyone as present today except Mason," the chatbot will only handle the first part of the input, which is "mark everyone as present today." The chatbot will not handle the second part of the input, which is "except Mason." In this post, I will show you how I fixed this issue.

In Student Attendance Chatbot (Version 3), I specified the OpenAI model as "gpt-3.5-turbo," which, at the time of writing, was pointing at "gpt-3.5-turbo-0613." This model is not capable of "Parallel Function Calling (opens in a new tab)." Luckily, on DevDay on November 6, 2023, OpenAI released a new 3.5 model called "gpt-3.5-turbo-1106," which can do exactly that. Check out my updated version of Student Attendance Chatbot at https://github.com/calvincchan/student-attendance-chatbot/tree/version-4 (opens in a new tab) using this model, or run it in CodeSandbox as shown below."

Tests

"everyone is present today, but Mia is sick"

✨ Hello Mr. Smith, the default homeroom is 1, and today's date is 2023-12-29. How can I assist you today?
> everyone is present today, but Mia is sick
πŸš€ Function call: setAllPresentByHomeroom { homeroom: '1', date: '2023-12-29' }
Marked all students in homeroom 1 as present on 2023-12-29
πŸš€ Function call: setAttendance {
  name: 'Mia',
  homeroom: '1',
  date: '2023-12-29',
  present: false,
  reason: 'Sick'
}
Set attendance for student 10001 on 2023-12-29 to false with reason Sick
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚ Student_id β”‚   Student_name   β”‚ Attendance_date β”‚ Attendance_present β”‚ Attendance_reason β”‚ Student_homeroom β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚  '10001'   β”‚    'Mia Chen'    β”‚  '2023-12-29'   β”‚         0          β”‚      'Sick'       β”‚       '1'        β”‚
β”‚    1    β”‚  '10008'   β”‚  'Aiden Kumar'   β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    2    β”‚  '10015'   β”‚    'Mila Lee'    β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    3    β”‚  '10022'   β”‚   'Ezra Wang'    β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    4    β”‚  '10029'   β”‚ 'Aaliyah Lopez'  β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    5    β”‚  '10036'   β”‚    'Liam Rao'    β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    6    β”‚  '10043'   β”‚    'Lily Wu'     β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    7    β”‚  '10050'   β”‚   'Kai Singh'    β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    8    β”‚  '10057'   β”‚   'Avery Lin'    β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    9    β”‚  '10064'   β”‚   'Mason Lam'    β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   10    β”‚  '10071'   β”‚  'Harper Gupta'  β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   11    β”‚  '10078'   β”‚  'William Kim'   β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   12    β”‚  '10085'   β”‚  'Ella Morales'  β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   13    β”‚  '10092'   β”‚  'Lucas Kumar'   β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   14    β”‚  '10099'   β”‚   'Ava Singh'    β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   15    β”‚  '10106'   β”‚ 'Liam Hernandez' β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   16    β”‚  '10113'   β”‚  'Lily Garcia'   β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   17    β”‚  '10120'   β”‚   'Harper Lam'   β”‚  '2023-12-29'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
>

"mark everyone as present yesterday except Mason"

> mark everyone as present yesterday except Mason
πŸš€ Function call: setAllPresentByHomeroom { homeroom: '1', date: '2023-12-28' }
Marked all students in homeroom 1 as present on 2023-12-28
πŸš€ Function call: setAttendance { name: 'Mason', homeroom: '1', date: '2023-12-28', present: false }
Set attendance for student 10064 on 2023-12-28 to false with reason undefined
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚ Student_id β”‚   Student_name   β”‚ Attendance_date β”‚ Attendance_present β”‚ Attendance_reason β”‚ Student_homeroom β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚  '10001'   β”‚    'Mia Chen'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    1    β”‚  '10008'   β”‚  'Aiden Kumar'   β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    2    β”‚  '10015'   β”‚    'Mila Lee'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    3    β”‚  '10022'   β”‚   'Ezra Wang'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    4    β”‚  '10029'   β”‚ 'Aaliyah Lopez'  β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    5    β”‚  '10036'   β”‚    'Liam Rao'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    6    β”‚  '10043'   β”‚    'Lily Wu'     β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    7    β”‚  '10050'   β”‚   'Kai Singh'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    8    β”‚  '10057'   β”‚   'Avery Lin'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    9    β”‚  '10064'   β”‚   'Mason Lam'    β”‚  '2023-12-28'   β”‚         0          β”‚       null        β”‚       '1'        β”‚
β”‚   10    β”‚  '10071'   β”‚  'Harper Gupta'  β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   11    β”‚  '10078'   β”‚  'William Kim'   β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   12    β”‚  '10085'   β”‚  'Ella Morales'  β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   13    β”‚  '10092'   β”‚  'Lucas Kumar'   β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   14    β”‚  '10099'   β”‚   'Ava Singh'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   15    β”‚  '10106'   β”‚ 'Liam Hernandez' β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   16    β”‚  '10113'   β”‚  'Lily Garcia'   β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   17    β”‚  '10120'   β”‚   'Harper Lam'   β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
>

"show Mia's record this month"

> Show Mia's record this month
πŸš€ Function call: findAttendance {
  homeroom: '1',
  studentName: 'Mia',
  fromDate: '2023-12-01',
  toDate: '2023-12-31'
}
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚ Student_id β”‚ Student_name β”‚ Attendance_date β”‚ Attendance_present β”‚ Attendance_reason β”‚ Student_homeroom β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚  '10001'   β”‚  'Mia Chen'  β”‚  '2023-12-01'   β”‚         1          β”‚        ''         β”‚       '1'        β”‚
β”‚    1    β”‚  '10001'   β”‚  'Mia Chen'  β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    2    β”‚  '10001'   β”‚  'Mia Chen'  β”‚  '2023-12-29'   β”‚         0          β”‚      'Sick'       β”‚       '1'        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
>

using other languages (Chinese)

> ✨ Hello Mr. Smith! How can I assist you today?
> Mia δ»Šε€©η”Ÿη—…δΊ†
πŸš€ Function call: setAttendance {
  name: 'Mia',
  homeroom: '1',
  date: '2023-12-29',
  present: false,
  reason: 'η”Ÿη—…'
}
Set attendance for student 10001 on 2023-12-29 to false with reason η”Ÿη—…
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚ Student_id β”‚ Student_name β”‚ Attendance_date β”‚ Attendance_present β”‚ Attendance_reason β”‚ Student_homeroom β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚  '10001'   β”‚  'Mia Chen'  β”‚  '2023-12-29'   β”‚         0          β”‚      'η”Ÿη—…'       β”‚       '1'        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
>  ι‘―η€Ίδ»Šε€‹ζœˆηš„ε‡ΊεΈ­θ‘¨
πŸš€ Function call: findAttendance { homeroom: '1', fromDate: '2023-12-01', toDate: '2023-12-31' }
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚ Student_id β”‚ Student_name  β”‚ Attendance_date β”‚ Attendance_present β”‚ Attendance_reason β”‚ Student_homeroom β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚  '10001'   β”‚  'Mia Chen'   β”‚  '2023-12-01'   β”‚         1          β”‚        ''         β”‚       '1'        β”‚
β”‚    1    β”‚  '10008'   β”‚ 'Aiden Kumar' β”‚  '2023-12-01'   β”‚         1          β”‚        ''         β”‚       '1'        β”‚
β”‚    2    β”‚  '10015'   β”‚  'Mila Lee'   β”‚  '2023-12-01'   β”‚         1          β”‚        ''         β”‚       '1'        β”‚
β”‚    3    β”‚  '10022'   β”‚  'Ezra Wang'  β”‚  '2023-12-01'   β”‚         0          β”‚ 'fever and cough' β”‚       '1'        β”‚
β”‚    4    β”‚  '10001'   β”‚  'Mia Chen'   β”‚  '2023-12-29'   β”‚         0          β”‚      'η”Ÿη—…'       β”‚       '1'        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
> ζ˜¨ε€©ζ‰€ζœ‰δΊΊιƒ½ζœ‰ε‡ΊεΈ­οΌŒεͺζœ‰ Mason η”Ÿη—…δΊ†
πŸš€ Function call: setAllPresentByHomeroom { homeroom: '1', date: '2023-12-28' }
Marked all students in homeroom 1 as present on 2023-12-28
πŸš€ Function call: setAttendance {
  name: 'Mason',
  homeroom: '1',
  date: '2023-12-28',
  present: false,
  reason: 'Sick'
}
Set attendance for student 10064 on 2023-12-28 to false with reason Sick
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚ Student_id β”‚   Student_name   β”‚ Attendance_date β”‚ Attendance_present β”‚ Attendance_reason β”‚ Student_homeroom β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚  '10001'   β”‚    'Mia Chen'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    1    β”‚  '10008'   β”‚  'Aiden Kumar'   β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    2    β”‚  '10015'   β”‚    'Mila Lee'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    3    β”‚  '10022'   β”‚   'Ezra Wang'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    4    β”‚  '10029'   β”‚ 'Aaliyah Lopez'  β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    5    β”‚  '10036'   β”‚    'Liam Rao'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    6    β”‚  '10043'   β”‚    'Lily Wu'     β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    7    β”‚  '10050'   β”‚   'Kai Singh'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    8    β”‚  '10057'   β”‚   'Avery Lin'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚    9    β”‚  '10064'   β”‚   'Mason Lam'    β”‚  '2023-12-28'   β”‚         0          β”‚      'Sick'       β”‚       '1'        β”‚
β”‚   10    β”‚  '10071'   β”‚  'Harper Gupta'  β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   11    β”‚  '10078'   β”‚  'William Kim'   β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   12    β”‚  '10085'   β”‚  'Ella Morales'  β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   13    β”‚  '10092'   β”‚  'Lucas Kumar'   β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   14    β”‚  '10099'   β”‚   'Ava Singh'    β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   15    β”‚  '10106'   β”‚ 'Liam Hernandez' β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   16    β”‚  '10113'   β”‚  'Lily Garcia'   β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β”‚   17    β”‚  '10120'   β”‚   'Harper Lam'   β”‚  '2023-12-28'   β”‚         1          β”‚       null        β”‚       '1'        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
>

Thoughts

I think this version is even closer to my original goal of creating a chatbot that can handle natural language requests more accurately. However, it still doesn't have conversation memory that enables follow-up questions. It will be something I will look into next.

With the new models that support parallel function calling, it will be even easier to integrate AI into existing applications. I am looking forward to experimenting with more application ideas in the future.

⭐️

Follow-up: I have written a new version to with interactive web frontend. Check out the following link: