rewrite my prompt
Browse files- modules/chat_func.py +5 -0
modules/chat_func.py
CHANGED
|
@@ -273,10 +273,13 @@ def predict_all(
|
|
| 273 |
|
| 274 |
logging.info(f"分析食物中营养成分的prompt构建完成:{prompt_with_ingredient}")
|
| 275 |
|
|
|
|
| 276 |
history_ingredient=[]
|
| 277 |
history_ingredient.append(construct_user(prompt_with_ingredient))
|
| 278 |
history_ingredient.append(construct_assistant(""))
|
| 279 |
|
|
|
|
|
|
|
| 280 |
response_ingredient = get_response(
|
| 281 |
openai_api_key,
|
| 282 |
"",
|
|
@@ -300,6 +303,8 @@ def predict_all(
|
|
| 300 |
history_rec.append(construct_user(prompt_rec))
|
| 301 |
history_rec.append(construct_assistant(""))
|
| 302 |
|
|
|
|
|
|
|
| 303 |
response = get_response(
|
| 304 |
openai_api_key,
|
| 305 |
"",
|
|
|
|
| 273 |
|
| 274 |
logging.info(f"分析食物中营养成分的prompt构建完成:{prompt_with_ingredient}")
|
| 275 |
|
| 276 |
+
|
| 277 |
history_ingredient=[]
|
| 278 |
history_ingredient.append(construct_user(prompt_with_ingredient))
|
| 279 |
history_ingredient.append(construct_assistant(""))
|
| 280 |
|
| 281 |
+
logging.info(f"history_ingredient:{history_ingredient}")
|
| 282 |
+
|
| 283 |
response_ingredient = get_response(
|
| 284 |
openai_api_key,
|
| 285 |
"",
|
|
|
|
| 303 |
history_rec.append(construct_user(prompt_rec))
|
| 304 |
history_rec.append(construct_assistant(""))
|
| 305 |
|
| 306 |
+
logging.info(f"history_rec:{history_rec}")
|
| 307 |
+
|
| 308 |
response = get_response(
|
| 309 |
openai_api_key,
|
| 310 |
"",
|