Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/biff-ai/chatgpt-langchainjs-example

ChatGPT & langchain example for node.js
https://github.com/biff-ai/chatgpt-langchainjs-example

Last synced: 2 months ago
JSON representation

ChatGPT & langchain example for node.js

Lists

README

        

ChatGPT & langchain example for node.js
=======================================

This repository contains containerized code from [this tutorial](https://langchainers.hashnode.dev/getting-started-with-langchainjs) modified to use the ChatGPT language model, trained by OpenAI, in a node.js project using [LangChain.js](https://github.com/hwchase17/langchainjs), an API for language models. The prompt is also slightly modified from the original. 😉

Getting started
To use this code, you will need to have a OpenAI API key. If you don't have one yet, you can get one by signing up at https://platform.openai.com

Once you have your API key, clone this repository and add the following with your key to `config/env`:

```
OPENAI_API_KEY={YOUR_API_KEY}
```

After this you can test it by building and running with:

```
docker build -t langchain_example .
docker run -it langchain_example
```