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
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
2023-10-12 18:23:41 +00:00
|
|
|
```shell
|
2023-10-11 16:50:15 +00:00
|
|
|
npm install
|
|
|
|
```
|
|
|
|
|
|
|
|
## Run
|
|
|
|
|
2023-10-12 18:23:41 +00:00
|
|
|
```shell
|
2023-10-11 16:50:15 +00:00
|
|
|
ts-node main.ts
|
|
|
|
```
|
|
|
|
|
|
|
|
Running this example will print the response for "hello":
|
|
|
|
|
2023-10-12 18:23:41 +00:00
|
|
|
```plaintext
|
2023-10-11 16:50:15 +00:00
|
|
|
Hello! It's nice to meet you. hopefully you are having a great day! Is there something I can help you with or would you like to chat?
|
|
|
|
```
|