2023-08-09 18:49:22 +00:00
|
|
|
# LangChain
|
|
|
|
|
|
|
|
This example is a basic "hello world" of using LangChain with Ollama.
|
|
|
|
|
2023-12-22 17:10:41 +00:00
|
|
|
## Running the Example
|
2023-08-09 18:49:22 +00:00
|
|
|
|
2023-12-22 17:10:41 +00:00
|
|
|
1. Ensure you have the `llama2` model installed:
|
2023-08-09 18:49:22 +00:00
|
|
|
|
2023-12-22 17:10:41 +00:00
|
|
|
```bash
|
|
|
|
ollama pull llama2
|
|
|
|
```
|
2023-08-09 18:49:22 +00:00
|
|
|
|
2023-12-22 17:10:41 +00:00
|
|
|
2. Install the Python Requirements.
|
2023-08-11 06:35:19 +00:00
|
|
|
|
2023-12-22 17:10:41 +00:00
|
|
|
```bash
|
|
|
|
pip install -r requirements.txt
|
|
|
|
```
|
2023-08-11 06:35:19 +00:00
|
|
|
|
2023-12-22 17:10:41 +00:00
|
|
|
3. Run the example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
python main.py
|
|
|
|
```
|
|
|
|
|