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: 3 months ago
JSON representation
ChatGPT & langchain example for node.js
- Host: GitHub
- URL: https://github.com/biff-ai/chatgpt-langchainjs-example
- Owner: biff-ai
- License: mit
- Created: 2023-03-05T13:07:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-05T13:12:09.000Z (almost 2 years ago)
- Last Synced: 2024-08-02T16:47:20.989Z (6 months ago)
- Language: TypeScript
- Size: 8.79 KB
- Stars: 61
- Watchers: 1
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-langchain-zh - ChatGPT - ai/chatgpt-langchainjs-example?style=social): 适用于 node.js & Docker的 ChatGPT & langchain 示例 (开源项目 / 其他聊天机器人)
- awesome-langchain - ChatGPT - ai/chatgpt-langchainjs-example?style=social) (Open Source Projects / Other / Chatbots)
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.comOnce 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
```