当社のウェブサイトをご覧ください。
質問がありますか? SlackまたはLinenでコミュニティに参加してください!
完全なドキュメントについては、こちらをご覧ください。
ここでLangstream vsコード拡張機能を取得します。
警告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ドキュメントを参照してください。
Sample Chat Completions Application On-Flyを実行します。
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チャートを使用できます。
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
ローカルラングストリームクラスターを作成するには、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 dev start
このコマンドは、 minikube
コンテキストで画像を作成し、スナップショット画像を使用してすべてのLangStreamサービスをインストールします。
クラスターが実行されたら、ABDを構築する場合は、特定のサービスの新しいバージョンをロードしたい場合は、実行できます。
mini-langstream dev build < service >
またはすべてのサービスに対して
mini-langstream dev build