2023-10-11 16:50:15 +00:00
|
|
|
# LangChain
|
|
|
|
|
2023-10-12 18:23:41 +00:00
|
|
|
This example is a basic "hello world" of using LangChain with Ollama using Node.js and Typescript.
|
2023-10-11 16:50:15 +00:00
|
|
|
|
2023-12-22 17:10:41 +00:00
|
|
|
## Running the Example
|
2023-10-11 16:50:15 +00:00
|
|
|
|
2023-12-22 17:10:41 +00:00
|
|
|
1. Install the prerequisites:
|
2023-10-11 16:50:15 +00:00
|
|
|
|
2023-12-22 17:10:41 +00:00
|
|
|
```bash
|
|
|
|
npm install
|
|
|
|
```
|
2023-10-11 16:50:15 +00:00
|
|
|
|
2023-12-22 17:10:41 +00:00
|
|
|
2. Ensure the `mistral` model is available:
|
2023-10-11 16:50:15 +00:00
|
|
|
|
2023-12-22 17:10:41 +00:00
|
|
|
```bash
|
|
|
|
ollama pull mistral
|
|
|
|
```
|
2023-10-11 16:50:15 +00:00
|
|
|
|
2023-12-22 17:10:41 +00:00
|
|
|
3. Run the example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
npm start
|
|
|
|
```
|