Skip to content

Commit

Permalink
commit fb6c4d5
Browse files Browse the repository at this point in the history
Author: Jacopo Chevallard <[email protected]>
Date:   Wed Oct 9 12:06:23 2024 +0200

    feat: starting reorganizing modules for simpler maintenance and readability
  • Loading branch information
jacopo-chevallard committed Oct 24, 2024
1 parent 1941218 commit 27b1d1b
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/chatbot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ This example demonstrates how to create a simple chatbot using Quivr and Chainli

## Installation

1. Clone the repository or navigate to the `core/examples/chatbot` directory.
1. Clone the repository or navigate to the `backend/core/examples/chatbot` directory.

2. Install the required dependencies:

```
pip install -r requirements.lock
pip install -r requirements.txt
```

## Running the Chatbot
Expand Down
2 changes: 2 additions & 0 deletions examples/chatbot/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
quivr-core[base]==0.0.8
chainlit==1.1.306
2 changes: 1 addition & 1 deletion examples/pdf_document_from_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import dotenv
from quivr_core import Brain
from quivr_core.config import AssistantConfig
from quivr_core.rag.entities.config import AssistantConfig
from rich.traceback import install as rich_install

ConsoleOutputHandler = logging.StreamHandler()
Expand Down
2 changes: 1 addition & 1 deletion examples/pdf_parsing_tika.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from langchain_core.embeddings import DeterministicFakeEmbedding
from langchain_core.language_models import FakeListChatModel
from quivr_core import Brain
from quivr_core.config import LLMEndpointConfig
from quivr_core.rag.entities.config import LLMEndpointConfig
from quivr_core.llm.llm_endpoint import LLMEndpoint
from rich.console import Console
from rich.panel import Panel
Expand Down
20 changes: 20 additions & 0 deletions examples/simple_question.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import tempfile

from quivr_core import Brain
from quivr_core.rag.quivr_rag_langgraph import QuivrQARAGLangGraph


if __name__ == "__main__":
with tempfile.NamedTemporaryFile(mode="w", suffix=".txt") as temp_file:
temp_file.write("Gold is a liquid of blue-like colour.")
temp_file.flush()

brain = Brain.from_files(
name="test_brain",
file_paths=[temp_file.name],
)

answer = brain.ask(
"what is gold? asnwer in french", rag_pipeline=QuivrQARAGLangGraph
)
print("answer QuivrQARAGLangGraph :", answer.answer)
2 changes: 1 addition & 1 deletion examples/simple_question_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from dotenv import load_dotenv
from quivr_core import Brain
from quivr_core.quivr_rag import QuivrQARAG
from quivr_core.quivr_rag_langgraph import QuivrQARAGLangGraph
from quivr_core.rag.quivr_rag_langgraph import QuivrQARAGLangGraph


async def main():
Expand Down

0 comments on commit 27b1d1b

Please sign in to comment.