-
Notifications
You must be signed in to change notification settings - Fork 119
Solution with gemini #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: solution
Are you sure you want to change the base?
Conversation
kelsey-steven-ada
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realized I never left any indication I looked at this 😬 Thank you so much for getting these updates done, it's looking great!
The only thing that caught my eye is extremely minor around ordering that already existed in add_greetings where we call generate_greetings before checking if character_obj.greetings already has values.
app/routes/character_routes.py
Outdated
|
|
||
| def generate_greetings(character): | ||
| model = genai.GenerativeModel("gemini-1.5-flash") | ||
| input_message = f"I am writing a rantasy RPG video game. I have an npc named {character.name} who is {character.age} years old. They are a {character.occupation} who has a {character.personality} personality. Please generate a python style list of 10 stock phrases they might use when the main character talks to them. Please Return just the list without a variable name and square brackets." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| input_message = f"I am writing a rantasy RPG video game. I have an npc named {character.name} who is {character.age} years old. They are a {character.occupation} who has a {character.personality} personality. Please generate a python style list of 10 stock phrases they might use when the main character talks to them. Please Return just the list without a variable name and square brackets." | |
| input_message = f"I am writing a fantasy RPG video game. I have an npc named {character.name} who is {character.age} years old. They are a {character.occupation} who has a {character.personality} personality. Please generate a Python style list of 10 stock phrases they might use when the main character talks to them. Please return just the list without a variable name and square brackets." |
app/routes/character_routes.py
Outdated
| db.session.add_all(new_greetings) | ||
| db.session.commit() | ||
|
|
||
| return make_response(jsonify(f"Greetings successfully added to {character_obj.name}"), 201) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could remove jsonify through the project
…g patterns in Unit 2
Update to remove jsonify and directly return data structures following Unit 2 Patterns
Solution: remove jsonify and directly return data structures following Unit 2 Patterns
…ncy that takes time
Update dependencies for Python 3.13
Update solution dependencies
f0ef0ee to
9531d34
Compare
No description provided.