https://github.com/hwchase17/langchain-template-node-fly
https://github.com/hwchase17/langchain-template-node-fly
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hwchase17/langchain-template-node-fly
- Owner: hwchase17
- Created: 2023-02-24T17:17:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-26T17:44:31.000Z (about 2 years ago)
- Last Synced: 2025-02-08T22:43:25.727Z (2 months ago)
- Language: Dockerfile
- Size: 29.9 MB
- Stars: 31
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - hwchase17/langchain-template-node-fly - (Dockerfile)
README
# Template for deploying a Langchain Node.js app to Fly
## Running it locally
Install dependencies
`$ yarn`
Run the app in watch mode
`$ OPENAI_API_KEY= yarn dev`
Try it
`$ curl -H 'Content-Type: application/json' -d '{"input": "hi there"}' 'http://localhost:8080/chat'`
This template has been setup for using with VSCode. You can visit https://yarnpkg.com/getting-started/editor-sdks for setup instructions for other editors.
## Deploying to Fly
Install flyctl on Mac OS
`$ brew install flyctl`
Login on your account
`$ flyctl auth login`
Deploy to the world
`$ fly launch -e OPENAI_API_KEY=`
Try it
`$ curl -H 'Content-Type: application/json' -d '{"input": "hi there"}' 'https://.fly.dev/chat'`