SanAbdra commited on
Commit
3e02304
·
verified ·
1 Parent(s): 4538a14
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -17,8 +17,12 @@ def process_event(text, system_message):
17
  top_p=0.95,
18
  )
19
 
20
- # Возвращаем сгенерированный текст
21
- return response.choices[0].content
 
 
 
 
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