Skip to content
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

Solution with gemini #2

Open
wants to merge 10 commits into
base: solution
Choose a base branch
from
Open

Solution with gemini #2

wants to merge 10 commits into from

Conversation

apradoada
Copy link
Collaborator

No description provided.

Copy link

@kelsey-steven-ada kelsey-steven-ada left a 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.

@@ -83,15 +77,12 @@ def add_greetings(char_id):
return make_response(jsonify(f"Greetings successfully added to {character_obj.name}"), 201)

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."
Copy link

@kelsey-steven-ada kelsey-steven-ada Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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."

@@ -83,15 +77,12 @@ def add_greetings(char_id):
return make_response(jsonify(f"Greetings successfully added to {character_obj.name}"), 201)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants