Skip to content

Commit

Permalink
Merge pull request #11 from 6drf21e/fix-chat-history-context-passing
Browse files Browse the repository at this point in the history
[Fix] Correct the bug where the chat history feature does not pass conversation context
  • Loading branch information
fatwang2 authored Apr 2, 2024
2 parents 9b29a4c + 7291e5f commit 075fdce
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions search4all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 075fdce

Please sign in to comment.