Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -165,9 +165,8 @@ class GeminiInteractionLoop:
|
|
165 |
return
|
166 |
try:
|
167 |
logging.info(f"Sending text to Gemini: '{user_text[:50]}...'")
|
168 |
-
#
|
169 |
-
|
170 |
-
await self.gemini_session.send(content)
|
171 |
except Exception as e:
|
172 |
logging.error(
|
173 |
f"Error sending text message to Gemini: {e}", exc_info=True)
|
@@ -434,9 +433,8 @@ class GeminiInteractionLoop:
|
|
434 |
f"Gemini session established with API for model {MODEL_NAME}.")
|
435 |
try:
|
436 |
logging.info("Sending system prompt to Gemini...")
|
437 |
-
#
|
438 |
-
|
439 |
-
await self.gemini_session.send(content)
|
440 |
logging.info("System prompt sent successfully.")
|
441 |
except Exception as e:
|
442 |
logging.error(
|
|
|
165 |
return
|
166 |
try:
|
167 |
logging.info(f"Sending text to Gemini: '{user_text[:50]}...'")
|
168 |
+
# Send text using input parameter format
|
169 |
+
await self.gemini_session.send(input={"text": user_text})
|
|
|
170 |
except Exception as e:
|
171 |
logging.error(
|
172 |
f"Error sending text message to Gemini: {e}", exc_info=True)
|
|
|
433 |
f"Gemini session established with API for model {MODEL_NAME}.")
|
434 |
try:
|
435 |
logging.info("Sending system prompt to Gemini...")
|
436 |
+
# Send system prompt using input parameter format
|
437 |
+
await self.gemini_session.send(input={"text": MEDICAL_ASSISTANT_SYSTEM_PROMPT})
|
|
|
438 |
logging.info("System prompt sent successfully.")
|
439 |
except Exception as e:
|
440 |
logging.error(
|