Skip to content

Feature: Retrieval functionality to attach document to user prompt #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mobile-is-mine
Copy link

New Feature: Attach Documents in Chat

Description

This PR adds a new functionality that allows users to import documents from their local storage and attach them as prompts in chat.

Motivation

Enhancing the user experience by enabling personalized responses based on imported documents.

Implementation Details

1. Embedding

  • Used Ollama embedding model to embed the imported documents.

2. Storing Embedded Results

  • Stored the embedded results using Swift Vector Database.
  • You can find Swift Vector Database here.

How to Test

  1. Go to the left sidebar.
  2. Open the Retrieval Modal by clicking the "Retrieval" button.
  3. Create a new database.
  4. Import files from local storage.
  5. Index the imported files.
  6. Close the modal.
  7. In the chat, click the document icon (left of the voice input icon).
  8. Enable the "Use Document" option.
  9. Select the database to use in chat.
  10. Test chat functionality.
📸 Screenshots

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant