Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feat: add claude 3 to bedrock provider #1551

Merged
merged 4 commits into from
Mar 14, 2024

Conversation

danielglh
Copy link
Contributor

@danielglh danielglh commented Mar 12, 2024

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • ⚡️ perf
  • 📝 docs

🔀 变更说明 | Description of Change

Add Claude 3 support to AWS Bedrock provider

image

fix #1511

📝 补充信息 | Additional Information

Anthropic has two APIs, the Messages API and the Text Completions API. They have different interfaces and different streaming formats. The Text Completions API is now marked as "Legacy" and Anthropic encourages to use of the Messages API instead.

image

Previous to the release of Claude 3, AWS Bedrock supported the Text Completions API for Claude 1.2, 2 & 2.1. Claude 3 was only released with the Messages API (due to the reason above), which was why simply adding a new model didn't work.

Therefore, this PR replaces the existing Text Completions API implementation with Messages API implementation.

@lobehubbot
Copy link
Member

👍 @danielglh

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

Copy link

vercel bot commented Mar 12, 2024

@danielglh is attempting to deploy a commit to the LobeHub Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 94.06780% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 92.99%. Comparing base (31c987a) to head (30ccd9a).
Report is 1 commits behind head on main.

Files Patch % Lines
src/libs/agent-runtime/bedrock/index.ts 81.08% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1551      +/-   ##
==========================================
+ Coverage   92.57%   92.99%   +0.41%     
==========================================
  Files         232      233       +1     
  Lines       12474    12514      +40     
  Branches     1510     1524      +14     
==========================================
+ Hits        11548    11637      +89     
+ Misses        926      877      -49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arvinxx arvinxx changed the title Feat: add claude 3 support to bedrock provider ✨ feat: add claude 3 support to bedrock provider Mar 13, 2024
Copy link

vercel bot commented Mar 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2024 8:12am

@arvinxx arvinxx changed the title ✨ feat: add claude 3 support to bedrock provider ✨ feat: add claude 3 to bedrock provider Mar 14, 2024
@arvinxx arvinxx merged commit 6e1fe33 into lobehub:main Mar 14, 2024
6 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @danielglh ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

github-actions bot pushed a commit that referenced this pull request Mar 14, 2024
## [Version 0.135.0](v0.134.1...v0.135.0)
<sup>Released on **2024-03-14**</sup>

#### ✨ Features

- **misc**: Add claude 3 to bedrock provider.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Add claude 3 to bedrock provider, closes [#1551](#1551) ([6e1fe33](6e1fe33))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

🎉 This PR is included in version 0.135.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Mar 14, 2024
## [Version&nbsp;1.17.0](v1.16.1...v1.17.0)
<sup>Released on **2024-03-14**</sup>

#### ✨ Features

- **misc**: Add claude 3 to bedrock provider.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Add claude 3 to bedrock provider, closes [lobehub#1551](https://github.com/bentwnghk/lobe-chat/issues/1551) ([6e1fe33](6e1fe33))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
denvey pushed a commit to denvey/lobe-chat that referenced this pull request Mar 17, 2024
* ✨ feat: new claude 3 models in bedrock

* ✨ support claude 3 params and stream handling

* ♻️ fix: remove useless condition check

* ✨ feat: add haiku to both bedrock and anthropic provider
denvey pushed a commit to denvey/lobe-chat that referenced this pull request Mar 17, 2024
## [Version&nbsp;0.135.0](lobehub/lobe-chat@v0.134.1...v0.135.0)
<sup>Released on **2024-03-14**</sup>

#### ✨ Features

- **misc**: Add claude 3 to bedrock provider.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Add claude 3 to bedrock provider, closes [lobehub#1551](lobehub#1551) ([6e1fe33](lobehub@6e1fe33))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
miroshar-success added a commit to miroshar-success/OpenAI_Integraion_platform that referenced this pull request Apr 5, 2024
## [Version&nbsp;0.135.0](lobehub/lobe-chat@v0.134.1...v0.135.0)
<sup>Released on **2024-03-14**</sup>

#### ✨ Features

- **misc**: Add claude 3 to bedrock provider.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Add claude 3 to bedrock provider, closes [#1551](lobehub/lobe-chat#1551) ([6e1fe33](lobehub/lobe-chat@6e1fe33))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@BluerAngala
Copy link

出现错误!当使用代理时,提示错误。

image

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


An error occurred! When using a proxy, an error message appears.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request] 支持AWS bedrock的Claude 3 API调用
4 participants