Commit ·
4811382
1
Parent(s): 78a1b32
gemini-2.5-flash-preview-05-20
Browse files
app.py
CHANGED
|
@@ -767,16 +767,7 @@ class GaiaLevel1Agent:
|
|
| 767 |
|
| 768 |
if genai and GOOGLE_GEMINI_API_KEY:
|
| 769 |
try:
|
| 770 |
-
|
| 771 |
-
# or if the API key is passed directly to genai.Client()
|
| 772 |
-
# However, keeping it for now as it doesn't hurt if GOOGLE_GEMINI_API_KEY is set.
|
| 773 |
-
# If GOOGLE_API_KEY (the generic one) is intended for the client, it's often picked up automatically.
|
| 774 |
-
# For clarity, if GOOGLE_GEMINI_API_KEY is specific and different, ensure Client uses it.
|
| 775 |
-
# The new SDK typically uses GOOGLE_API_KEY from env.
|
| 776 |
-
# If GOOGLE_GEMINI_API_KEY is specifically for GenAI and different from a general GOOGLE_API_KEY,
|
| 777 |
-
# it should be passed to Client() if the client supports an api_key argument,
|
| 778 |
-
# or ensure genai.configure(api_key=GOOGLE_GEMINI_API_KEY) correctly sets it for the client.
|
| 779 |
-
# The migration guide implies genai.configure() still works or the client picks it up.
|
| 780 |
genai.configure(api_key=GOOGLE_GEMINI_API_KEY)
|
| 781 |
self.genai_client = genai.Client()
|
| 782 |
gaia_logger.info(f"Google GenAI Client initialized. Will use model '{self.llm_model_name}'.")
|
|
@@ -1143,7 +1134,7 @@ class GaiaLevel1Agent:
|
|
| 1143 |
|
| 1144 |
|
| 1145 |
try:
|
| 1146 |
-
gen_config = GenerationConfig(temperature=0.1, top_p=0.95, max_output_tokens=
|
| 1147 |
safety_settings = [
|
| 1148 |
{"category": HarmCategory.HARM_CATEGORY_HARASSMENT, "threshold": HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE},
|
| 1149 |
{"category": HarmCategory.HARM_CATEGORY_HATE_SPEECH, "threshold": HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE},
|
|
|
|
| 767 |
|
| 768 |
if genai and GOOGLE_GEMINI_API_KEY:
|
| 769 |
try:
|
| 770 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 771 |
genai.configure(api_key=GOOGLE_GEMINI_API_KEY)
|
| 772 |
self.genai_client = genai.Client()
|
| 773 |
gaia_logger.info(f"Google GenAI Client initialized. Will use model '{self.llm_model_name}'.")
|
|
|
|
| 1134 |
|
| 1135 |
|
| 1136 |
try:
|
| 1137 |
+
gen_config = GenerationConfig(temperature=0.1, top_p=0.95, max_output_tokens=10024)
|
| 1138 |
safety_settings = [
|
| 1139 |
{"category": HarmCategory.HARM_CATEGORY_HARASSMENT, "threshold": HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE},
|
| 1140 |
{"category": HarmCategory.HARM_CATEGORY_HATE_SPEECH, "threshold": HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE},
|