- Add new steps to resolve Ollama connection issues when directly accessed from the browser extension
- Instruct users to set `OLLAMA_HOST=0.0.0.0` environment variable and restart Ollama
- Provide additional troubleshooting guidance for users still facing issues
- 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
- Update the styles and layout of the "New Chat" and dropdown buttons in the NewChat component
- Rounded the buttons to match the design
- Adjusted the spacing and alignment of the button elements
- Ensured consistent styling between light and dark modes
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.
This commit extends the `MessageSource` component to support the `chat` mode in addition to the existing `rag` mode. This allows the component to handle and display messages from both chat and RAG (Rapid Automated Generation) sources.
This commit enhances the `PageAssistSelect` component with the following improvements:
- Adds a `ref` to the options container to automatically scroll to the selected option when the dropdown is opened.
- Fixes an issue where the `selectedOption` was not being correctly determined when the `options` array was updated.
- Improves the rendering of the selected option, ensuring that the loading state, placeholder, and selected option are displayed correctly.
- Adds a `data-value` attribute to the option elements to facilitate scrolling to the selected option.
These changes improve the overall user experience and functionality of the `PageAssistSelect` component.
This commit introduces a new `PageAssistSelect` component to the header, which replaces the previous `Select` component for selecting the active chat model. The new component provides improved functionality, including:
- Ability to display provider icons alongside the model name
- Truncation of long model names to ensure they fit within the available space
- Improved loading state handling
- Ability to refresh the model list on demand
These changes enhance the user experience and make it easier for users to quickly select the desired chat model.
Adds error handling to the `updateMessageByIndex` function to prevent the temporary chat from breaking when an error occurs during the update process. This ensures a more robust and reliable experience for users.
This commit addresses an issue where temporary chat history was not being updated correctly when using voice input.
The `setHistoryId` function is now called within the `saveMessageOnError` function to ensure that the history ID is set correctly when a message is saved.
This commit introduces a more efficient approach to fetching ollama2 models, ensuring proper filtering and handling of providers. This enhances the robustness and reliability of the model loading process, streamlining the overall user experience.
Expanded the list of providers for which models are fetched dynamically to include Ollama and Llamafile, removing the need for manual model addition in the user interface for these providers. This simplifies the user experience and ensures users always have access to the latest models without manual intervention.
Adds support for using Ollama 2 as a model provider. This includes:
- Adding Ollama 2 to the list of supported providers in the UI
- Updating the model identification logic to properly handle Ollama 2 models
- Modifying the model loading and runtime configuration to work with Ollama 2
- Implementing Ollama 2 specific functionality in the embedding and chat models
This change allows users to leverage the capabilities of Ollama 2 for both embeddings and conversational AI tasks.
Add support for LlamaFile, a new model provider that allows users to interact with models stored in LlamaFile format. This includes:
- Adding an icon for LlamaFile in the provider selection menu.
- Updating the model provider selection to include LlamaFile.
- Updating the model handling logic to properly identify and process LlamaFile models.
- Updating the API providers list to include LlamaFile.
This enables users to leverage the capabilities of LlamaFile models within the 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 "Temporary Chat" mode for quick, non-persistent conversations. The new mode is available in the header bar and will trigger a visually distinct chat experience with a temporary background color. Temporary chats do not save to the chat history and are meant for short, one-off interactions. This feature enhances flexibility and provides a more convenient option for users who need to quickly interact with the AI without committing the conversation to their history.
Adds support for using the currently selected system prompt in the current model settings. This allows users to fine-tune their chat experience based on their preferred prompt.
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.
Adds the `generationInfo` field to the message history output to provide more context about the message's origin. This will be helpful for debugging and understanding the provenance of messages.
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.
Support `equation` and `align` environments for LaTeX.
This change enables us to handle more complex LaTeX expressions, including those within environments. By replacing the delimiters for these environments with the appropriate MathJax equivalents, we ensure consistent rendering of mathematical equations within the application.
The previous LaTeX preprocessing logic had a bug that could lead to incorrect rendering of mathematical equations. This commit refactors the logic to ensure that both block-level and inline equations are properly handled, improving the accuracy of LaTeX rendering in the application.