-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Anthropic Claude Block #1336
Anthropic Claude Block #1336
Conversation
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the WalkthroughThe update introduces the Anthropic block within the Forge package, enabling the creation of chat messages through the Anthropic AI SDK, specifically using Claude AI. This integration allows for passing a history of chat messages between the assistant and users to Claude AI, processing them, and displaying the responses in Typebot. It includes functionalities for message creation, secure API key storage, model selection, and message processing, along with a new Anthropic logo component. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@Retr0-01 is attempting to deploy a commit to the Typebot Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thank you for this amazing work 👍 Can you provide push access to that PR? https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests |
Thanks @baptisteArno |
@coderabbitai review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files ignored due to path filters (9)
apps/docs/images/blocks/integrations/anthropic/append-to-history.png
is excluded by:!**/*.png
apps/docs/images/blocks/integrations/anthropic/assistant-message.png
is excluded by:!**/*.png
apps/docs/images/blocks/integrations/anthropic/dialogue-usage.png
is excluded by:!**/*.png
apps/docs/images/blocks/integrations/anthropic/overview.png
is excluded by:!**/*.png
apps/docs/mint.json
is excluded by:!**/*.json
packages/forge/blocks/anthropic/package.json
is excluded by:!**/*.json
packages/forge/blocks/anthropic/tsconfig.json
is excluded by:!**/*.json
packages/forge/schemas/package.json
is excluded by:!**/*.json
pnpm-lock.yaml
is excluded by:!**/*.yaml
Files selected for processing (9)
- apps/docs/editor/blocks/integrations/anthropic.mdx (1 hunks)
- packages/forge/blocks/anthropic/actions/createChatMessage.tsx (1 hunks)
- packages/forge/blocks/anthropic/auth.ts (1 hunks)
- packages/forge/blocks/anthropic/constants.ts (1 hunks)
- packages/forge/blocks/anthropic/helpers/parseChatMessages.ts (1 hunks)
- packages/forge/blocks/anthropic/index.ts (1 hunks)
- packages/forge/blocks/anthropic/logo.tsx (1 hunks)
- packages/forge/repository/index.ts (1 hunks)
- packages/forge/schemas/index.ts (2 hunks)
Additional comments: 8
packages/forge/repository/index.ts (1)
- 11-11: The addition of
'anthropic'
to theenabledBlocks
array is correctly implemented and aligns with the PR's objective to introduce the Claude AI block.packages/forge/blocks/anthropic/constants.ts (1)
- 1-12: The constants for Anthropic models and default options are correctly defined and immutable. Consider adding a comment or documentation note about the hardcoded model versions and the process for updating them in the future.
packages/forge/blocks/anthropic/logo.tsx (1)
- 1-7: The
AnthropicLogo
component is correctly implemented and follows React best practices.packages/forge/blocks/anthropic/index.ts (1)
- 1-13: The definition of the
anthropic
block is correctly implemented and aligns with the project's architecture and the PR's objectives.packages/forge/blocks/anthropic/auth.ts (1)
- 1-17: The authentication schema for the Anthropic block is correctly implemented and follows best practices. Consider adding a note or documentation about security considerations for storing API keys securely.
apps/docs/editor/blocks/integrations/anthropic.mdx (1)
- 1-41: The documentation for the Anthropic block is clear and informative. Consider correcting the spelling of "typebot" to "type bot" for consistency with the rest of the documentation. Additionally, ensure that all Markdown syntax is correctly used to avoid rendering issues.
packages/forge/schemas/index.ts (1)
- 30-30: The inclusion of the
anthropic
block in theforgedBlocks
array is correctly implemented and aligns with the PR's objectives for integrating the block into the project.packages/forge/blocks/anthropic/helpers/parseChatMessages.ts (1)
- 7-52: The
parseChatMessages
function is correctly implemented and handles different message roles effectively. Consider adding comments to clarify the logic in complex sections, especially when handling dialogue messages and role-based message creation.
Alright, I've added a few fixes, they are all separated in clear commits. Feel free to check them out. Does it look good to you? |
@baptisteArno the changes have been reviewed and they look good to us. I believe this is ready to be merged! |
Hello @baptisteArno,
As we discussed in issue #1315 we created a basic implementation of Anthropic’s Claude AI block.
This block is based on the OpenAI block and shares a similar structure.
The most notable changes in this PR are:
Some notes to be made:
Summary by CodeRabbit