langstream
v0.6.2
查看我们的网站。
有问题吗?加入我们的懒惰或亚麻的社区!
有关完整的文档,请转到此处。
在此处获取langstream vs code扩展名。
警告CLI要求已在计算机上安装Java 11+。
有多种安装CLI的方法。
macos:
brew install LangStream/langstream/langstream
curl -Ls "https://raw.githubusercontent.com/LangStream/langstream/main/bin/get-cli.sh" | bash
UNIX:
curl -Ls "https://raw.githubusercontent.com/LangStream/langstream/main/bin/get-cli.sh" | bash
可用验证二进制文件:
langstream -V
请参阅CLI文档以了解更多信息。
运行示例聊天完成申请:
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
在不同的终端窗口中:
langstream gateway chat test -cg consume-output -pg produce-input -p sessionId= $( uuidgen )
在示例文件夹中查看更多示例应用程序。
要创建自己的应用程序,请参阅开发人员文档。
Langstream已经准备好生产,并且强烈建议将其部署在Kubernetes群集上。支持以下Kubernetes分布:
要运行一个langstream群集,您需要进行以下外部组件:
要安装langstream,您可以使用langstream
头盔图:
helm repo add langstream https://langstream.ai/charts
helm repo update
然后创建值文件。此时,您已经需要启动并运行存储服务。
如果您使用S3,则可以使用以下值:
codeStorage :
type : s3
configuration :
access-key : <aws-access-key>
secret-key : <aws-secret-key>
对于Azure:
codeStorage :
type : azure
configuration :
endpoint : https://<storage-account>.blob.core.windows.net
container : langstream
storage-account-name : <storage-account>
storage-account-key : <storage-account-key>
现在安装langstream:
helm install -n langstream --create-namespace langstream langstream/langstream --values values.yaml
kubectl wait -n langstream deployment/langstream-control-plane --for condition=available --timeout=300s
要创建一个本地的langstream群集,建议使用Minikube。 mini-langstream
为安装和管理本地群集提供了帮助。
安装mini-langstream
:
brew install LangStream/langstream/mini-langstream
curl -Ls " https://raw.githubusercontent.com/LangStream/langstream/main/mini-langstream/get-mini-langstream.sh " | bash
然后启动集群:
mini-langstream start
部署应用程序:
export OPEN_AI_ACCESS_KEY= < your-openai-api-key >
mini-langstream cli apps deploy my-app -app https://github.com/LangStream/langstream/tree/main/examples/applications/openai-completions -s https://github.com/LangStream/langstream/blob/main/examples/secrets/secrets.yaml
停止集群:
mini-langstream delete
请参阅Mini-Langstream文档以了解更多信息。
建立项目的要求:
如果要测试本地代码更改,则可以使用mini-langstream
。
mini-langstream dev start
此命令将在minikube
上下文中构建图像,并使用快照图像安装所有Langstream服务。
群集运行后,如果要构建ABD加载新版本的特定服务的新版本,则可以运行:
mini-langstream dev build < service >
或所有服务
mini-langstream dev build