From 7291e5fc1f8bece5ee0a6e6d3a9b188071cb6bcf Mon Sep 17 00:00:00 2001 From: 6drf21e Date: Tue, 2 Apr 2024 18:07:03 +0800 Subject: [PATCH] fix-chat-history-context-passing --- search4all.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/search4all.py b/search4all.py index 26bdc0b..686d32f 100644 --- a/search4all.py +++ b/search4all.py @@ -726,10 +726,7 @@ async def query_function(request: sanic.Request): messages[1:1] = chat_history llm_response = await openai_client.chat.completions.create( model=_app.ctx.model, - messages=[ - {"role": "system", "content": system_prompt}, - {"role": "user", "content": query}, - ], + messages=messages, max_tokens=1024, stream=True, temperature=0.9,