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