Welcome to the world of LangStream, where the complexities of AI and application development become not just manageable, but enjoyable. In this guide, we’ll walk you through the various functionalities of LangStream, from installation to deployment. So, roll up your sleeves and let’s dive in!
What is LangStream?
LangStream is an innovative framework designed to streamline the development and deployment of AI applications. It simplifies the integration of different components, enabling developers to focus more on creating excellent applications and less on dealing with the underlying infrastructure.
CLI Installation
To kick things off, you’ll need to install the LangStream Command-Line Interface (CLI). Here’s how:
Installation Steps
- MacOS:
- Using Homebrew:
brew install LangStream/langstream/langstream
- Using Curl:
curl -Ls https://raw.githubusercontent.com/LangStream/langstream/main/bin/get-cli.sh | bash
- Using Homebrew:
- Unix:
- Using Curl:
curl -Ls https://raw.githubusercontent.com/LangStream/langstream/main/bin/get-cli.sh | bash
- Using Curl:
Once installed, verify by running: langstream -V
. For detailed CLI installation instructions, refer to the CLI documentation.
Try the Sample Application
Ready to take LangStream for a spin? You can run a sample Chat Completions application:
export OPEN_AI_ACCESS_KEY=your-key-here
langstream docker run test-app https://github.com/LangStream/langstream/blob/main/examples/applications/openai-completions -s https://github.com/LangStream/langstream/blob/main/examples/secrets/secrets.yaml
Next, in another terminal window:
langstream gateway chat test -cg consume-output -pg produce-input -p sessionId=$(uuidgen)
Throughout this experience, think of LangStream like a master chef in a highly efficient kitchen. It gathers all the right ingredients (API, tools, etc.) and orchestrates them to create a delicious dish (your AI application) effortlessly. Want to see more sample applications? Check out the examples folder.
Create Your Own Application
If you wish to develop your own custom application, make sure to check the developer documentation for detailed guidance.
Run LangStream on Kubernetes
For production usage, it’s highly recommended to deploy on a Kubernetes cluster. Supported distributions include:
- Amazon EKS
- Azure AKS
- Google GKE
- Minikube
Production-Ready Deployment
To install LangStream on a Kubernetes cluster, use the following Helm commands:
helm repo add langstream https://langstream.ai/charts
helm repo update
Create a values file and set up your storage service following the documentation.
Local Deployment with Minikube
For local testing, you can use Minikube with mini-langstream. To install:
brew install LangStream/langstream/mini-langstream
Then, start up the cluster:
mini-langstream start
For further details, consult the mini-langstream documentation.
Troubleshooting
If you encounter issues during installation or deployment, consider the following troubleshooting tips:
- Ensure you have Java 11+ installed for CLI functionality.
- Check your internet connection; some commands require downloading resources.
- Read error logs carefully—they often contain clues to solve the problems.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.