Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

add max_output_tokens config for Gemini

Abi Raja50be89407131
diff --git a/backend/llm.py b/backend/llm.py
index 3d9b01dd..f9cecaf5 100644
--- a/backend/llm.py
+++ b/backend/llm.py
@@ -270,7 +270,7 @@ async def stream_gemini_response(
] # type: ignore
}, # type: ignore
config=types.GenerateContentConfig( # type: ignore
- temperature=0,
+ temperature=0, max_output_tokens=8192
),
): # type: ignore
if response.text: # type: ignore