history/update is not executed when there are no errors in currentChat
tateren opened this issue · comments
Describe the bug
We have enabled chat history.
However, only user messages are being saved, and the assistant's responses are not being saved.
To Reproduce
Steps to reproduce the behavior:
- Enable chat history.
- Start the chat.
Expected behavior
Chat history is saved.
Configuration: Please provide the following
- Azure OpenAI model name and version. gpt-35-turbo-16k
- Is chat history enabled? Yes
- Are you using data? No
Additional context
In this process, I believe that if there are no errors in currentChat, saveToDB is not being called.
sample-app-aoai-chatGPT/frontend/src/pages/chat/Chat.tsx
Lines 555 to 558 in c6162b6
I have this same issue. The tools and assistant role history are not being saved to Cosmos DB. If I deploy a new Web App and Cosmos DB from the AI Playground, History is saved correctly. If I use the current code against my existing web app and Cosmos DBs, the history isn't saved correctly.
This doesn't seem to be called at any point of the conversation.
@bp.route("/history/generate", methods=["POST"])
async def add_conversation():
The changes from #768 fixed the issue for me. Great work finding the issue so quickly!