- Python ^3.10
- Poetry (optional)
- Node.js >=16
- Yarn (optional: npm can be used instead)
- make (optional: jump to Slow start if you don't have it)
If you have all the requirements installed, you can run the following commands to start the app.
# Setup all the things
make setup
# Run all the things
make runall
# Or if you installed tmux
make tmux
# Run the backend
make backend
# Run the frontend
make frontend
If you don't have make
installed, you can follow the steps below to start the app.
# Create a .env.local file
cp .env.local.example .env.local
And fill in the values for the environment variables.
Launch the backend server first.
Or
cd backend
# Download necessary packages
poetry install
# or
pip install -r requirements.txt
# Start your backend server
poetry run uvicorn api.conversation_chain:app --reload
# or
python uvicorn api.conversation_chain:app
Open up another terminal (tab or window) and keep your backend running.
# In the new terminal cd into the next-app directory
cd frontend
# Install all dependencies
yarn install
# Start your frontend app
yarn dev
Opening http://localhost:3000/ in your browser should now show your frontend Next.js app.
Requirement: Unix like shell, zsh or bash; tmux installed.
In project folder "my_langchain_pa", you can use rundev.sh to start the app.
./rundev.sh
When you successfully launch the backend server, you can visit http://localhost:8000 to use the playground.
- fastapi-async-langchain for backend
- langchain-chat-nextjs for quick start