#Master Manager made in PyQT5.

2 messages · Page 1 of 1 (latest)

haughty mulch
radiant coral
#

nice project 👍.
i got one small improvement for the google ai.
you are using an outdated library https://ai.google.dev/gemini-api/docs/migrate#python_2

import google.generativeai as genai <----- old lib import
from google import genai <----- new one

the newer thing is more readable and the older one could cause some problems so it is better to use the new one. this is what google said ---> "If you're using one of our legacy libraries, we strongly recommend you to migrate."

and its also better to give it the system_instructions instead of putting it all in one single prompt. its easier to jailbreak with the single prompt one.

response = client.models.generate_content(
model=YOUR_MODEL,
config=types.GenerateContentConfig(
system_instruction=SYSTEM_PROMPT,
contents=YOUR_QUESTION

and you can also set a specific amount of output tokens and overall tweak a lot of things to make the ai give better responses.