From 227101a6e78e122d427243f1ce7680e718f1abbe Mon Sep 17 00:00:00 2001 From: Linghui Gong Date: Thu, 7 Mar 2024 10:23:52 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20fix=20anthropic=20streami?= =?UTF-8?q?ng=20on=20Vercel/Cloudflare=20(#1480)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 📝 docs(bot): Auto sync agents & plugin to readme * :bug: fix: anthropic streaming issue on vercel * :memo: update document, remove anthropic known issue --------- Co-authored-by: lobehubbot Co-authored-by: GH Action - Upstream Sync --- .../environment-variables/model-provider.mdx | 5 ----- .../environment-variables/model-provider.zh-CN.mdx | 9 +-------- package.json | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/docs/self-hosting/environment-variables/model-provider.mdx b/docs/self-hosting/environment-variables/model-provider.mdx index cf38e2cf0522..ad7277b32c61 100644 --- a/docs/self-hosting/environment-variables/model-provider.mdx +++ b/docs/self-hosting/environment-variables/model-provider.mdx @@ -163,8 +163,3 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann - Default: - - Example: `sk-ant-apixx-xxxxxxxxx-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx` - - - There's [a known issue](https://github.com/anthropics/anthropic-sdk-typescript/issues/292) with the official Anthropic SDK on Vercel/Cloudflare edge runtime, which causes chat streams to be interrupted randomly. If you want to use the Anthropic provider, do not use Vercel/Cloudflare for now; the Anthropic provider should be working fine with other hosting options. - - diff --git a/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx b/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx index 516d75580631..29949f68b1ad 100644 --- a/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +++ b/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx @@ -159,11 +159,4 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量, - 类型:必选 - 描述:这是你在 Anthropic AI 服务中申请的 API 密钥 - 默认值:- -- 示例:`sk-ant-apixx-xxxxxxxxx-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx` - - - 官方 Anthropic SDK 在 Vercel/Cloudflare - 边缘节点运行时存在一个[已知问题](https://github.com/anthropics/anthropic-sdk-typescript/issues/292) - ,会导致聊天流出现随机中断。如果您希望在 lobe-chat 中使用 Anthropic 模型,请暂时不要部署到 - Vercel/Cloudflare。Anthropic 模型在其他部署方式下可以正常工作。 - +- 示例:`sk-ant-apixx-xxxxxxxxx-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx` \ No newline at end of file diff --git a/package.json b/package.json index 4f73dc62f349..6d2f5f00ade3 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ }, "dependencies": { "@ant-design/icons": "^5", - "@anthropic-ai/sdk": "^0.16.0", + "@anthropic-ai/sdk": "^0.17.0", "@auth/core": "latest", "@aws-sdk/client-bedrock-runtime": "^3.503.1", "@azure/openai": "^1.0.0-beta.11",