- Add new "vision" chat mode to the application
- Implement the `visionChatMode` function to handle vision-based chat interactions
- Update the UI to include a new button to toggle the vision chat mode
- Add new translations for the "vision" chat mode tooltip
- Disable certain UI elements when the vision chat mode is active
This commit includes the following improvements:
- Update the `memoryEmbedding` function to use the `PAMemoryVectorStore` instead of the generic `MemoryVectorStore`. This ensures that the vector store is specifically designed for the Page Assist application.
- Modify the `useMessage` hook to use the `PAMemoryVectorStore` type for the `keepTrackOfEmbedding` state.
- Update the `rerankDocs` function to use the `EmbeddingsInterface` type instead of the deprecated `Embeddings` type.
- Add a new `PageAssistVectorStore` class that extends the `VectorStore` interface and provides a custom implementation for the Page Assist application.
These changes improve the handling of memory embeddings and vector stores, ensuring better compatibility and performance within the Page Assist application.
The code was relying on optional fields like `content` in chat history and chunk objects, leading to potential errors if these fields were missing. This commit ensures proper handling of these fields by adding optional chaining (`?.`) for safer access. This prevents crashes and ensures the application handles the missing fields gracefully.
Adds a new setting to control the maximum number of tokens generated by the model. This provides more control over the length of responses and can be useful for limiting the amount of text generated in certain situations.
This commit introduces a new feature that displays generation information for each message in the chat.
The generation info is displayed in a popover and includes details about the model used, the prompt, and other relevant information. This helps users understand how their messages were generated and troubleshoot any issues that may arise.
The generation info is retrieved from the LLM response and is stored in the database alongside other message details.
This commit also includes translations for the generation info label in all supported languages.
Adds support for Ollama embedding, enabling the use of Ollama as an embedding model for RAG.
This allows users to leverage Ollama's advanced embedding capabilities for better document understanding and retrieval.
Refactor embedding models and their handling to improve performance and simplify the process.
Add a new model selection mechanism, and enhance the UI for model selection, offering clearer and more user-friendly options for embedding models.
Refactor embeddings to use a common model for page assist and RAG, further improving performance and streamlining the workflow.
Add a provider selection dropdown to the OpenAI settings, enabling users to choose from pre-configured options like "Azure" or "Custom." This streamlines setup and allows for more flexibility in configuring OpenAI API endpoints. The dropdown pre-populates base URLs and names based on the selected provider.
The dropdown also automatically populates base URLs and names based on the selected provider, further simplifying the configuration process.
This commit introduces support for custom models in the message history generation process. Previously, the history would format messages using LangChain's standard message structure, which is not compatible with custom models. This change allows for correct history formatting regardless of the selected model type, enhancing compatibility and user experience.