- This event has passed.
6 PM – AI Agent – Gamas
July 15 @ 6:00 pm - 7:00 pm
Today We Did
- We learned how to force the AI to return JSON response text. This way it would easier to parse AI response consistently.
Homework
- Inside spaceship_game.py, create a new function, create_a_new_person()
- Inside the function ask AI to create a new person every time you call the function, which will return a JSON in the following format
-
{ "name": "Gamas", "phone": "626-476-3067", "age": 49, "gender": "male" }
-
- Call this function inside the __main__ block
- If the age is between 13 and 19 then said “Gamas you are a teenager with phone number of 626-476-3067”. If not then just say “Gamas your phone number is 626-476-3067.
- Similar to AI_JUDGE_SCHEMA, you need to create PERSON_SCHEMA and pass this to the AI.
- Inside the function ask AI to create a new person every time you call the function, which will return a JSON in the following format