Comment on page
You can get started with LangStream in 5 minutes or less. This guide will walk you through the steps to get LangStream running on your local machine.
- 1.Install the LangStream CLI:
brew install LangStream/langstream/langstream
- 2.Run the sample application
Let's run a simple LangStream Application that implements a ChatBot using OpenAI's API.
langstream docker run test -app https://github.com/LangStream/langstream/tree/main/examples/applications/openai-completions -s https://github.com/LangStream/langstream/blob/main/examples/secrets/secrets.yaml
The first time you run the application, it will take a few minutes to download the Docker images.
- 3.Chat with the bot
Once the application is running, chat with the bot using the LangStream CLI:
langstream gateway chat test -cg consume-output -pg produce-input -p sessionId=$(uuidgen)
If you see an 'application not found' error, LangStream is still not ready to accept the connections. Wait a few seconds and try again.
With LangStream installed and your environment set up, you're ready to build an application.
Here are a few ways to get started building LangStream applications: