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

https://github.com/hwchase17/langchain-template-node-fly


https://github.com/hwchase17/langchain-template-node-fly

Last synced: 12 days ago
JSON representation

Awesome Lists containing this project

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'`