Skip to content

Commit

Permalink
fix(chat): update data keys (#923)
Browse files Browse the repository at this point in the history
  • Loading branch information
mamadoudicko committed Aug 10, 2023
1 parent 0cc6dcf commit 21db719
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/core/llm/qa_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def generate_answer(

model_response = qa(
{
"question": question,
"question": question.question,
"chat_history": transformed_history,
"custom_personality": self.get_prompt(),
}
Expand Down Expand Up @@ -227,7 +227,7 @@ async def wrap_done(fn: Awaitable, event: asyncio.Event):
wrap_done(
qa.acall(
{
"question": question,
"question": question.question,
"chat_history": transformed_history,
"custom_personality": self.get_prompt(),
}
Expand Down
2 changes: 1 addition & 1 deletion backend/core/repository/chat/get_chat_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class GetChatHistoryOutput(BaseModel):

def dict(self, *args, **kwargs):
chat_history = super().dict(*args, **kwargs)
chat_history["chat_id"] = str(chat_history.get("prompt_id"))
chat_history["chat_id"] = str(chat_history.get("chat_id"))
chat_history["message_id"] = str(chat_history.get("message_id"))

return chat_history
Expand Down

0 comments on commit 21db719

Please sign in to comment.