2023-08-11 06:35:19 +00:00
|
|
|
# LangChain Document QA
|
|
|
|
|
|
|
|
This example provides an interface for asking questions to a PDF document.
|
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
2024-07-30 06:56:37 +00:00
|
|
|
1. Ensure you have the `llama3.1` model installed:
|
|
|
|
|
|
|
|
```
|
|
|
|
ollama pull llama3.1
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Install the Python Requirements.
|
|
|
|
|
2023-08-11 06:35:19 +00:00
|
|
|
```
|
|
|
|
pip install -r requirements.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
## Run
|
|
|
|
|
|
|
|
```
|
|
|
|
python main.py
|
|
|
|
```
|
|
|
|
|
|
|
|
A prompt will appear, where questions may be asked:
|
|
|
|
|
|
|
|
```
|
|
|
|
Query: How many locations does WeWork have?
|
|
|
|
```
|