A TypeScript sample app for the Retrieval Augmented Generation pattern running on Azure, using Azure AI Search for retrieval and Azure OpenAI and LangChain large language models (LLMs) to power ChatGPT-style and Q&A experiences.
MIT License
252
stars
130
forks
source link
feat: add chat-history and refactor chat logic to a controller #159
Adds the option to view the past N conversations and include them in the chat API context for generation. Addresses [frontend] save user chat history #100
Refactor:
Decoupled chat message processing logic from rendering into a separate controller. This allows custom chat component to be created but still keep the parsing and processing by reusing the chat controller.
Also fixed the bug where thoughts and data points could not be selected per message
Fixed copy to copy the entire text
Fixed the bug where the chat thread was not being sent for requests in the context
Fixed the bug where '?' was dropped in the follow up question parsing
Does this introduce a breaking change?
[ ] Yes
[X] No
Pull Request Type
What kind of change does this Pull Request introduce?
[ ] Bugfix
[X] Feature
[ ] Code style update (formatting, local variables)
[X] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:
How to Test
Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
Test the code
npm run test:playwright
What to Check
Verify that the following are valid
Verify that the following are valid
Chat history button shows up for chat, but not ask
Chat history is preserved in the localstorage as an example
History is included in the context for the chat.
Purpose
Feature:
Refactor:
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
What to Check
Verify that the following are valid
Verify that the following are valid
Chat history button shows up for chat, but not ask Chat history is preserved in the localstorage as an example History is included in the context for the chat.
Other Information