(fix) avoid stringifying list

This commit is contained in:
ManishMadan2882
2024-12-19 17:58:55 +05:30
parent 9096013e13
commit b19c14787e
5 changed files with 16 additions and 10 deletions

View File

@@ -324,7 +324,7 @@ class Stream(Resource):
try:
question = data["question"]
history = str(limit_chat_history(json.loads(data.get("history", []))))
history = limit_chat_history(json.loads(data.get("history", [])), gpt_model=gpt_model)
conversation_id = data.get("conversation_id")
prompt_id = data.get("prompt_id", "default")
@@ -455,7 +455,7 @@ class Answer(Resource):
try:
question = data["question"]
history = str(limit_chat_history(json.loads(data.get("history", []))))
history = limit_chat_history(json.loads(data.get("history", [])), gpt_model=gpt_model)
conversation_id = data.get("conversation_id")
prompt_id = data.get("prompt_id", "default")
chunks = int(data.get("chunks", 2))