Spaces:
Sleeping
Sleeping
app.py
CHANGED
|
@@ -17,8 +17,12 @@ def process_event(text, system_message):
|
|
| 17 |
top_p=0.95,
|
| 18 |
)
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
calendar_system_message = """You are a calendar event parser assistant. Your task is to:
|
| 24 |
1. Understand the event description provided by the user
|
|
|
|
| 17 |
top_p=0.95,
|
| 18 |
)
|
| 19 |
|
| 20 |
+
# Правильно извлекаем текст из ответа
|
| 21 |
+
try:
|
| 22 |
+
generated_text = response.choices[0].message.content
|
| 23 |
+
return generated_text
|
| 24 |
+
except Exception as e:
|
| 25 |
+
return f"Error processing response: {str(e)}"
|
| 26 |
|
| 27 |
calendar_system_message = """You are a calendar event parser assistant. Your task is to:
|
| 28 |
1. Understand the event description provided by the user
|