Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def gpt_call(history, user_message,
|
|
29 |
|
30 |
# 2) 기존 대화 기록(history)을 OpenAI 형식으로 변환
|
31 |
# user_text -> 'user' / assistant_text -> 'assistant'
|
32 |
-
|
33 |
if isinstance(exchange, (list, tuple)) and len(exchange) == 2:
|
34 |
user_text, assistant_text = exchange
|
35 |
if isinstance(user_text, str) and user_text.strip():
|
|
|
29 |
|
30 |
# 2) 기존 대화 기록(history)을 OpenAI 형식으로 변환
|
31 |
# user_text -> 'user' / assistant_text -> 'assistant'
|
32 |
+
for exchange in history:
|
33 |
if isinstance(exchange, (list, tuple)) and len(exchange) == 2:
|
34 |
user_text, assistant_text = exchange
|
35 |
if isinstance(user_text, str) and user_text.strip():
|