mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-14 07:59:00 +03:00
fix: Update example in README.md
Updated the example code in the README.md file to create a RAG with 5 lines of code and ask a question about gold in French.
This commit is contained in:
parent
8a9803d5cb
commit
e95d48234f
32
README.md
32
README.md
@ -53,26 +53,26 @@ Ensure you have the following installed:
|
||||
|
||||
- **Step 2**: Create a RAG with 5 lines of code
|
||||
|
||||
```python
|
||||
import tempfile
|
||||
```python
|
||||
import tempfile
|
||||
|
||||
from quivr_core import Brain
|
||||
from quivr_core import Brain
|
||||
|
||||
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()
|
||||
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],
|
||||
)
|
||||
brain = Brain.from_files(
|
||||
name="test_brain",
|
||||
file_paths=[temp_file.name],
|
||||
)
|
||||
|
||||
answer = brain.ask(
|
||||
"what is gold? asnwer in french"
|
||||
)
|
||||
print("answer:", answer)
|
||||
```
|
||||
answer = brain.ask(
|
||||
"what is gold? asnwer in french"
|
||||
)
|
||||
print("answer:", answer)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user