From 308e94ecf4858d3a0d50911b7f6246a5a5718e5e Mon Sep 17 00:00:00 2001 From: crazywoola <100913391+crazywoola@users.noreply.github.com> Date: Thu, 28 Mar 2024 13:02:41 +0800 Subject: [PATCH] doc: update helm charts (#3012) create launch.json config optionally specify available bedrock model used in validation --- README.md | 9 ++++++--- README_CN.md | 8 +++++--- .../model_runtime/model_providers/bedrock/bedrock.py | 6 ++++-- .../model_runtime/model_providers/bedrock/bedrock.yaml | 3 ++- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 207f312946..80a60e9cad 100644 --- a/README.md +++ b/README.md @@ -100,10 +100,12 @@ docker compose up -d After running, you can access the Dify dashboard in your browser at [http://localhost/install](http://localhost/install) and start the initialization installation process. -### Helm Chart +#### Deploy with Helm Chart -Big thanks to @BorisPolonsky for providing us with a [Helm Chart](https://helm.sh/) version, which allows Dify to be deployed on Kubernetes. -You can go to https://github.com/BorisPolonsky/dify-helm for deployment information. +[Helm Chart](https://helm.sh/) version, which allows Dify to be deployed on Kubernetes. + +- [Helm Chart by @LeoQuote](https://github.com/douban/charts/tree/master/charts/dify) +- [Helm Chart by @BorisPolonsky](https://github.com/BorisPolonsky/dify-helm) ### Configuration @@ -120,6 +122,7 @@ For those who'd like to contribute code, see our [Contribution Guide](https://gi At the same time, please consider supporting Dify by sharing it on social media and at events and conferences. + ### Contributors diff --git a/README_CN.md b/README_CN.md index 6d33095d9c..81ba87f70e 100644 --- a/README_CN.md +++ b/README_CN.md @@ -94,10 +94,12 @@ docker compose up -d 运行后,可以在浏览器上访问 [http://localhost/install](http://localhost/install) 进入 Dify 控制台并开始初始化安装操作。 -### Helm Chart +#### 使用 Helm Chart 部署 -非常感谢 @BorisPolonsky 为我们提供了一个 [Helm Chart](https://helm.sh/) 版本,可以在 Kubernetes 上部署 Dify。 -您可以前往 https://github.com/BorisPolonsky/dify-helm 来获取部署信息。 +使用 [Helm Chart](https://helm.sh/) 版本,可以在 Kubernetes 上部署 Dify。 + +- [Helm Chart by @LeoQuote](https://github.com/douban/charts/tree/master/charts/dify) +- [Helm Chart by @BorisPolonsky](https://github.com/BorisPolonsky/dify-helm) ### 配置 diff --git a/api/core/model_runtime/model_providers/bedrock/bedrock.py b/api/core/model_runtime/model_providers/bedrock/bedrock.py index 96cb90280e..e99bc52ff8 100644 --- a/api/core/model_runtime/model_providers/bedrock/bedrock.py +++ b/api/core/model_runtime/model_providers/bedrock/bedrock.py @@ -17,9 +17,11 @@ class BedrockProvider(ModelProvider): """ try: model_instance = self.get_model_instance(ModelType.LLM) - bedrock_validate_model_name = credentials.get('model_for_validation', 'amazon.titan-text-lite-v1') + + # Use `amazon.titan-text-lite-v1` model by default for validating credentials + model_for_validation = credentials.get('model_for_validation', 'amazon.titan-text-lite-v1') model_instance.validate_credentials( - model=bedrock_validate_model_name, + model=model_for_validation, credentials=credentials ) except CredentialsValidateFailedError as ex: diff --git a/api/core/model_runtime/model_providers/bedrock/bedrock.yaml b/api/core/model_runtime/model_providers/bedrock/bedrock.yaml index e1923f8f8a..19ce51ddcd 100644 --- a/api/core/model_runtime/model_providers/bedrock/bedrock.yaml +++ b/api/core/model_runtime/model_providers/bedrock/bedrock.yaml @@ -74,7 +74,8 @@ provider_credential_schema: label: en_US: Available Model Name zh_Hans: 可用模型名称 - type: text-input + type: secret-input placeholder: en_US: A model you have access to (e.g. amazon.titan-text-lite-v1) for validation. zh_Hans: 为了进行验证,请输入一个您可用的模型名称 (例如:amazon.titan-text-lite-v1) +