{"repo":"QuivrHQ/quivr","free":true,"listed":false,"github":"https://github.com/QuivrHQ/quivr","clone":"git clone https://github.com/QuivrHQ/quivr.git","description":"Opiniated RAG for integrating GenAI in your apps 🧠   Focus on your product rather than the RAG. Easy integration in existing products with customisation!  Any LLM: GPT4, Groq, Llama. Any Vectorstore: PGVector, Faiss. Any Files. Anyway you want.","language":"Python","stars":39401,"topics":["ai","api","chatbot","chatgpt","database","docker","framework","frontend","groq","html","javascript","llm","openai","postgresql","privacy","rag","react","security","typescript","vector"],"license":null,"category":"rag_framework","readme_excerpt":"# Quivr - Your Second Brain, Empowered by Generative AI\n\n<div align=\"center\">\n    <img src=\"./logo.png\" alt=\"Quivr-logo\" width=\"31%\"  style=\"border-radius: 50%; padding-bottom: 20px\"/>\n</div>\n\n[![Discord Follow](https://dcbadge.vercel.app/api/server/HUpRgp2HG8?style=flat)](https://discord.gg/HUpRgp2HG8)\n[![GitHub Repo stars](https://img.shields.io/github/stars/quivrhq/quivr?style=social)](https://github.com/quivrhq/quivr)\n[![Twitter Follow](https://img.shields.io/twitter/follow/StanGirard?style=social)](https://twitter.com/_StanGirard)\n\nQuivr, helps you build your second brain, utilizes the power of GenerativeAI to be your personal assistant !\n\n## Key Features 🎯\n\n- **Opiniated RAG**: We created a RAG that is opinionated, fast and efficient so you can focus on your product\n- **LLMs**: Quivr works with any LLM, you can use it with OpenAI, Anthropic, Mistral, Gemma, etc.\n- **Any File**: Quivr works with any file, you can use it with PDF, TXT, Markdown, etc and even add your own parsers.\n- **Customize your RAG**: Quivr allows you to customize your RAG, add internet search, add tools, etc.\n- **Integrations with Megaparse**: Quivr works with [Megaparse](https://github.com/quivrhq/megaparse), so you can ingest your files with Megaparse and use the RAG with Quivr.\n\n>We take care of the RAG so you can focus on your product. Simply install quivr-core and add it to your project. You can now ingest your files and ask questions.*\n\n**We will be improving the RAG and adding more features, stay tuned!**\n\n\nThis is the core of Quivr, the brain of Quivr.com.\n\n<!-- ## Demo Highlight 🎥\n\nhttps://github.com/quivrhq/quivr/assets/19614572/a6463b73-76c7-4bc0-978d-70562dca71f5 -->\n\n## Getting Started 🚀\n\nYou can find everything on the [documentation](https://core.quivr.com/).\n\n### Prerequisites 📋\n\nEnsure you have the following installed:\n\n- Python 3.10 or newer\n\n### 30 seconds Installation 💽\n\n\n- **Step 1**: Install the package\n\n  \n\n  ```bash\n  pip install quivr-core # Check that the installation worked\n  ```\n\n\n- **Step 2**: Create a RAG with 5 lines of code\n\n  ```python\n  import tempfile\n\n  from quivr_core import Brain\n\n  if __name__ == \"__main__\":\n      with tempfile.NamedTemporaryFile(mode=\"w\", suffix=\".txt\") as temp_file:\n          temp_file.write(\"Gold is a liquid of blue-like colour.\")\n          temp_file.flush()\n\n          brain = Brain.from_files(\n              name=\"test_brain\",\n              file_paths=[temp_file.name],\n          )\n\n          answer = brain.ask(\n              \"what is gold? asnwer in french\"\n          )\n          print(\"answer:\", answer)\n  ```\n## Configuration\n\n### Workflows\n\n#### Basic RAG\n\n![](docs/docs/workflows/examples/basic_rag.excalidraw.png)\n\n\nCreating a basic RAG workflow like the one above is simple, here are the steps:\n\n\n1. Add your API Keys to your environment variables\n```python\nimport os\nos.environ[\"OPENAI_API_KEY\"] = \"myopenai_apikey\"\n\n```\nQuivr supports APIs from Anthropic, OpenAI, and Mistral. It also supports local models using Ollama.\n\n1. Create the YAML file ``basic_rag_workflow.yaml`` and copy the following content in it\n```yaml\nworkflow_config:\n  name: \"standard RAG\"\n  nodes:\n    - name: \"START\"\n      edges: [\"filter_history\"]\n\n    - name: \"filter_history\"\n      edges: [\"rewrite\"]\n\n    - name: \"rewrite\"\n      edges: [\"retrieve\"]\n\n    - name: \"retrieve\"\n      edges: [\"generate_rag\"]\n\n    - name: \"generate_rag\" # the name of the last node, from which we want to stream the answer to the user\n      edges: [\"END\"]\n\n# Maximum number of previous conversation iterations\n# to include in the context of the answer\nmax_history: 10\n\n# Reranker configuration\nreranker_config:\n  # The reranker supplier to use\n  supplier: \"cohere\"\n\n  # The model to use for the reranker for the given supplier\n  model: \"rerank-multilingual-v3.0\"\n\n  # Number of chunks returned by the reranker\n  top_n: 5\n\n# Configuration for the LLM\nllm_config:\n\n  # maximum number of tokens passed to the LLM to generate the answer\n  max_input_tokens: 4000\n\n  # temperature for the LLM\n  temperature: 0.7\n```\n\n3. Create a Brain with the default configuration\n```python\nfrom quivr_core import Brain\n\nbrain = Brain.from_files(name = \"my smart brain\",\n                        file_paths = [\"./my_first_doc.pdf\", \"./my_second_doc.txt\"],\n                        )\n\n```\n\n4. Launch a Chat\n```python\nbrain.print_info()\n\nfrom rich.console import Console\nfrom rich.panel import Panel\nfrom rich.prompt import Prompt\nfrom quivr_core.config import RetrievalConfig\n\nconfig_file_name = \"./basic_rag_workflow.yaml\"\n\nretrieval_config = RetrievalConfig.from_yaml(config_file_name)\n\nconsole = Console()\nconsole.print(Panel.fit(\"Ask your brain !\", style=\"bold magenta\"))\n\nwhile True:\n    # Get user input\n    question = Prompt.ask(\"[bold cyan]Question[/bold cyan]\")\n\n    # Check if user wants to exit\n    if question.lower() == \"exit\":\n        console.print(Panel(\"Goodbye!\", style=\"bold yellow\"))\n        break\n\n    answer = brain.ask(question, retrieval_config=retrieval_config)\n    # Print the answer with typing effect\n    console.print(f\"[bold green]Quivr Assistant[/bold green]: {answer.answer}\")\n\n    console.print(\"-\" * console.width)\n\nbrain.print_info()\n```\n\n5. You are now all set up to talk with your brain and test different retrieval strategies by simply changing the configuration file!\n\n## Go further\n\nYou can go further with Quivr by adding internet search, adding tools, etc. Check the [documentation](https://core.quivr.com/) for more information.\n\n\n## Contributors ✨\n\nThanks go to these wonderful people:\n<a href=\"https://github.com/quivrhq/quivr/graphs/contributors\">\n<img src=\"https://contrib.rocks/image?repo=quivrhq/quivr\" />\n</a>\n\n## Contribute 🤝\n\nDid you get a pull request? Open it, and we'll review it as soon as possible. Check out our project board [here](https://github.com/users/StanGirard/projects/5) to see what we're currently focused on, and feel free to bring your fresh ideas to the table!\n\n- [Open Issues](https://github.com/quivrhq/quivr/issues)\n- [Open Pull Requests](https://github.com/quivrhq/quivr/pulls)\n- [Good First Issues](https://github.com/quivrhq/quivr/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)\n\n## Partners ❤️\n\nThis project would not be possible without the support of our partners. Thank you for your support!\n\n\n<a href=\"https://ycombinator.com/\">\n    <img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Y_Combinator_logo.svg/1200px-Y_Combinator_logo.svg.png\" alt=\"YCombinator\" style=\"padding: 10px\" width=\"70px\">\n</a>\n<a href=\"https://www.theodo.fr/\">\n  <img src=\"https://avatars.githubusercontent.com/u/332041?s=200&v=4\" alt=\"Theodo\" style=\"padding: 10px\" width=\"70px\">\n</a>\n\n## License 📄\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details\n","default_branch":"main","files":231,"tree":[".flake8",".github/FUNDING.yml",".github/ISSUE_TEMPLATE/EXTERNAL_ISSUE_TEMPLATE.yml",".github/ISSUE_TEMPLATE/EXTERNAL_USER_FEATURE_REQUEST.yml",".github/ISSUE_TEMPLATE/INTERNAL_EPIC_TEMPLATE.yml",".github/ISSUE_TEMPLATE/INTERNAL_USER_STORY_TEMPLATE.yml",".github/ISSUE_TEMPLATE/config.yml",".github/PULL_REQUEST_TEMPLATE.md",".github/workflows/backend-core-tests.yml",".github/workflows/conventional-pr-title.yml",".github/workflows/release-please-core.yml",".github/workflows/stale.yml",".gitignore",".pre-commit-config.yaml",".python-version",".readthedocs.yaml",".release-please-manifest.json",".vscode/extensions.json",".vscode/launch.json",".vscode/settings.json","CHANGELOG.md","LICENSE","README.md","core/.flake8","core/.gitignore","core/.python-version","core/CHANGELOG.md","core/Dockerfile.test","core/README.md","core/example_workflows/talk_to_file_rag_config_workflow.yaml","core/pyproject.toml","core/quivr_core/__init__.py","core/quivr_core/base_config.py","core/quivr_core/brain/__init__.py","core/quivr_core/brain/brain.py","core/quivr_core/brain/brain_defaults.py","core/quivr_core/brain/info.py","core/quivr_core/brain/serialization.py","core/quivr_core/config.py","core/quivr_core/files/__init__.py","core/quivr_core/files/file.py","core/quivr_core/language/models.py","core/quivr_core/language/utils.py","core/quivr_core/llm/__init__.py","core/quivr_core/llm/llm_endpoint.py","core/quivr_core/llm_tools/__init__.py","core/quivr_core/llm_tools/entity.py","core/quivr_core/llm_tools/llm_tools.py","core/quivr_core/llm_tools/other_tools.py","core/quivr_core/llm_tools/web_search_tools.py","core/quivr_core/processor/__init__.py","core/quivr_core/processor/implementations/__init__.py","core/quivr_core/processor/implementations/default.py","core/quivr_core/processor/implementations/megaparse_processor.py","core/quivr_core/processor/implementations/simple_txt_processor.py","core/quivr_core/processor/implementations/tika_processor.py","core/quivr_core/processor/processor_base.py","core/quivr_core/processor/registry.py","core/quivr_core/processor/splitter.py","core/quivr_core/rag/__init__.py","core/quivr_core/rag/entities/__init__.py","core/quivr_core/rag/entities/chat.py","core/quivr_core/rag/entities/config.py","core/quivr_core/rag/entities/models.py","core/quivr_core/rag/prompts.py","core/quivr_core/rag/quivr_rag.py","core/quivr_core/rag/quivr_rag_langgraph.py","core/quivr_core/rag/utils.py","core/quivr_core/storage/__init__.py","core/quivr_core/storage/file.py","core/quivr_core/storage/local_storage.py","core/quivr_core/storage/storage_base.py","core/requirements-dev.lock","core/requirements.lock","core/scripts/run_tests.sh","core/scripts/run_tests_buildx.sh","core/tests/__init__.py","core/tests/chunk_stream_fixture.jsonl","core/tests/conftest.py","core/tests/fixture_chunks.py","core/tests/processor/__init__.py","core/tests/processor/community/__init__.py","core/tests/processor/community/test_markdown_processor.py","core/tests/processor/data/dummy.pdf","core/tests/processor/data/guidelines_code.md","core/tests/processor/docx/__init__.py","core/tests/processor/docx/demo.docx","core/tests/processor/docx/test_docx.py","core/tests/processor/epub/__init__.py","core/tests/processor/epub/page-blanche.epub","core/tests/processor/epub/sway.epub","core/tests/processor/epub/test_epub_processor.py","core/tests/processor/odt/__init__.py","core/tests/processor/odt/bad_odt.odt","core/tests/processor/odt/sample.odt","core/tests/processor/odt/test_odt.py","core/tests/processor/pdf/__init__.py","core/tests/processor/pdf/sample.pdf","core/tests/processor/pdf/test_unstructured_pdf_processor.py","core/tests/processor/test_default_implementations.py","core/tests/processor/test_registry.py","core/tests/processor/test_simple_txt_processor.py","core/tests/processor/test_tika_processor.py","core/tests/processor/test_txt_processor.py","core/tests/rag_config.yaml","core/tests/rag_config_workflow.yaml","core/tests/test_brain.py","core/tests/test_chat_history.py","core/tests/test_config.py","core/tests/test_llm_endpoint.py","core/tests/test_quivr_file.py","core/tests/test_quivr_rag.py","core/tests/test_utils.py","core/tox.ini","docs/.gitignore","docs/.python-version","docs/README.md","docs/docs/brain/brain.md","docs/docs/brain/chat.md","docs/docs/brain/index.md","docs/docs/config/base_config.md","docs/docs/config/config.md","docs/docs/config/index.md","docs/docs/css/style.css","docs/docs/examples/assets/chatbot_voice_flask.mp4","docs/docs/examples/chatbot.md","docs/docs/examples/chatbot_voice.md","docs/docs/examples/chatbot_voice_flask.md","docs/docs/examples/custom_storage.md","docs/docs/examples/index.md","docs/docs/index.md","docs/docs/parsers/index.md","docs/docs/parsers/megaparse.md","docs/docs/parsers/simple.md","docs/docs/quickstart.md","docs/docs/storage/base.md","docs/docs/storage/index.md","docs/docs/storage/local_storage.md","docs/docs/vectorstores/faiss.md","docs/docs/vectorstores/index.md","docs/docs/vectorstores/pgvector.md","docs/docs/workflows/examples/basic_ingestion.excalidraw.png","docs/docs/workflows/examples/basic_ingestion.md","docs/docs/workflows/examples/basic_rag.excalidraw.png","docs/docs/workflows/examples/basic_rag.md","docs/docs/workflows/examples/rag_with_web_search.excalidraw.png","docs/docs/workflows/examples/rag_with_web_search.md","docs/docs/workflows/index.md","docs/mkdocs.yml","docs/overrides/empty","docs/pyproject.toml","docs/requirements-dev.lock","docs/requirements.lock","docs/src/docs/__init__.py","examples/chatbot/.chainlit/config.toml","examples/chatbot/.chainlit/translations/bn.json","examples/chatbot/.chainlit/translations/en-US.json","examples/chatbot/.chainlit/translations/gu.json","examples/chatbot/.chainlit/translations/he-IL.json","examples/chatbot/.chainlit/translations/hi.json","examples/chatbot/.chainlit/translations/kn.json","examples/chatbot/.chainlit/translations/ml.json","examples/chatbot/.chainlit/translations/mr.json","examples/chatbot/.chainlit/translations/ta.json","examples/chatbot/.chainlit/translations/te.json","examples/chatbot/.chainlit/translations/zh-CN.json","examples/chatbot/.gitignore","examples/chatbot/.python-version","examples/chatbot/README.md","examples/chatbot/basic_rag_workflow.yaml","examples/chatbot/chainlit.md","examples/chatbot/main.py","examples/chatbot/public/favicon.ico","examples/chatbot/public/logo_dark.png","examples/chatbot/public/logo_light.png","examples/chatbot/pyproject.toml","examples/chatbot/requirements-dev.lock","examples/chatbot/requirements.lock","examples/chatbot_voice/.chainlit/config.toml","examples/chatbot_voice/.chainlit/translations/bn.json","examples/chatbot_voice/.chainlit/translations/en-US.json","examples/chatbot_voice/.chainlit/translations/gu.json","examples/chatbot_voice/.chainlit/translations/he-IL.json","examples/chatbot_voice/.chainlit/translations/hi.json","examples/chatbot_voice/.chainlit/translations/kn.json","examples/chatbot_voice/.chainlit/translations/ml.json","examples/chatbot_voice/.chainlit/translations/mr.json","examples/chatbot_voice/.chainlit/translations/ta.json","examples/chatbot_voice/.chainlit/translations/te.json","examples/chatbot_voice/.chainlit/translations/zh-CN.json","examples/chatbot_voice/.gitignore","examples/chatbot_voice/.python-version","examples/chatbot_voice/README.md","examples/chatbot_voice/basic_rag_workflow.yaml","examples/chatbot_voice/chainlit.md","examples/chatbot_voice/main.py","examples/chatbot_voice/public/favicon.ico","examples/chatbot_voice/public/logo_dark.png","examples/chatbot_voice/public/logo_light.png","examples/chatbot_voice/pyproject.toml","examples/chatbot_voice/requirements-dev.lock","examples/chatbot_voice/requirements.lock","examples/pdf_document_from_yaml.py","examples/pdf_parsing_tika.py","examples/quivr-whisper/.env_example","examples/quivr-whisper/.gitignore","examples/quivr-whisper/.python-version","examples/quivr-whisper/README.md","examples/quivr-whisper/app.py","examples/quivr-whisper/pyproject.toml","examples/quivr-whisper/requirements-dev.lock","examples/quivr-whisper/requirements.lock","examples/quivr-whisper/static/app.js","examples/quivr-whisper/static/loader.svg","examples/quivr-whisper/static/mic-off.svg","examples/quivr-whisper/static/mic.svg","examples/quivr-whisper/static/styles.css","examples/quivr-whisper/templates/index.html","examples/save_load_brain.py","examples/simple_question/.gitignore","examples/simple_question/.python-version","examples/simple_question/README.md","examples/simple_question/pyproject.toml","examples/simple_question/requirements-dev.lock","examples/simple_question/requirements.lock","examples/simple_question/simple_question.py","examples/simple_question/simple_question_streaming.py","examples/simple_question_megaparse.py","logo.png","release-please-config.json","vercel.json"],"storefront":"/r/QuivrHQ","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/QuivrHQ/quivr/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}