-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Dify.AI Integration Block #1183
Conversation
@abdullahbaa5 is attempting to deploy a commit to the Typebot Team on Vercel. A member of the Team first needs to authorize it. |
Warning Rate Limit Exceeded@baptisteArno has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 54 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe updates involve integrating a new block called 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 (
|
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: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (4)
packages/forge/blocks/difyAi/package.json
is excluded by:!**/*.json
packages/forge/blocks/difyAi/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 (8)
- packages/forge/blocks/difyAi/actions/createChatMessage.ts (1 hunks)
- packages/forge/blocks/difyAi/auth.ts (1 hunks)
- packages/forge/blocks/difyAi/index.ts (1 hunks)
- packages/forge/blocks/difyAi/logo.tsx (1 hunks)
- packages/forge/blocks/difyAi/types.ts (1 hunks)
- packages/forge/cli/index.ts (1 hunks)
- packages/forge/repository/index.ts (1 hunks)
- packages/forge/schemas/index.ts (2 hunks)
Files skipped from review due to trivial changes (1)
- packages/forge/repository/index.ts
Additional comments: 7
packages/forge/blocks/difyAi/types.ts (1)
- 1-9: The
DifyResponse
type is well-defined and matches the expected structure from the Dify AI service. It includes all necessary fields such asanswer
,metadata
, andconversation_id
.packages/forge/blocks/difyAi/logo.tsx (1)
- 1-17: The
DifyAiLogo
component is correctly implemented as a functional React component with proper SVG properties and an image reference. Ensure that the image URL is valid and that it is intended to be publicly accessible.packages/forge/blocks/difyAi/index.ts (1)
- 1-13: The
difyAi
block is correctly set up with an ID, name, tags, logo, authentication, and actions. Ensure that the tags array includes all relevant tags for the Dify.AI block and that thecreateChatMessage
action is fully implemented and tested.packages/forge/blocks/difyAi/auth.ts (1)
- 1-21: The
auth
object is correctly structured to define encrypted credentials with a detailed schema forapiEndpoint
andapiKey
. The use ofinputType: 'password'
for the API key ensures that sensitive information is obscured in the UI. Confirm that thewithVariableButton
property is intended for both fields and that theapiEndpoint
helper text accurately describes the expected input.packages/forge/schemas/index.ts (1)
- 1-5: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [2-22]
The import and addition of the
difyAi
block to theforgedBlocks
array are correctly implemented. This change will make the Dify.AI block available for use. Ensure that the@typebot.io/dify-ai-block
package is correctly installed and that there are no naming conflicts with other blocks.packages/forge/blocks/difyAi/actions/createChatMessage.ts (1)
- 1-79: The
createChatMessage
action is well-structured with appropriate options and a server-side run function. Ensure that theinputs
JSON parsing is safe and that there is error handling in case of invalid JSON. Additionally, confirm that theresponseMapping
logic correctly maps the response to the variables and that thegot
library is properly handling network errors.packages/forge/cli/index.ts (1)
- 278-278: The change from
input: 'password'
toinputType: 'password'
is correct and enhances the security of the API key input. Ensure that this change is consistently applied across all instances where an API key is required.
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: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- packages/forge/blocks/difyAi/auth.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/forge/blocks/difyAi/auth.ts
Great work my friend :) I'm trying to push an improvement but get hit by that error while pushing:
Any idea how to remove that restriction? |
ah i disabled it. you should be able to push now. |
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 (4)
apps/docs/openapi/builder.json
is excluded by:!**/*.json
apps/docs/openapi/viewer.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 (7)
- apps/builder/src/pages/_app.tsx (1 hunks)
- packages/forge/blocks/difyAi/actions/createChatMessage.ts (1 hunks)
- packages/forge/blocks/difyAi/auth.ts (1 hunks)
- packages/forge/blocks/difyAi/constants.ts (1 hunks)
- packages/forge/core/index.ts (1 hunks)
- packages/forge/repository/index.ts (1 hunks)
- packages/forge/schemas/index.ts (2 hunks)
Files skipped from review due to trivial changes (1)
- packages/forge/blocks/difyAi/constants.ts
Files skipped from review as they are similar to previous changes (4)
- packages/forge/blocks/difyAi/actions/createChatMessage.ts
- packages/forge/blocks/difyAi/auth.ts
- packages/forge/repository/index.ts
- packages/forge/schemas/index.ts
Additional comments: 1
packages/forge/core/index.ts (1)
- 104-115: The addition of the
keyValueList
to theoption
object is correctly implemented with proper type definitions forkey
andvalue
properties. This change follows TypeScript best practices for defining object shapes and optional fields.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Implemented Dify.AI Block
Dify Features:
-- Can Create Multiple Chat Bots
-- Assign Knowledge base/vector database to chat bots
-- Variables send by client to be used in the prompt
-- Options of custom and cloud AI LLMs to be changed with on click
Dify API Function/Action Implemented
-- Create Chat Message (Takes in input variables, query, conversation id, user id and returns answer, usage metadata and conversation id)
Future Implantations with this block
-- Streaming response
-- File Upload for GPT Vision
-- Speech to text action
Summary by CodeRabbit
New Features
Enhancements
Documentation
Refactor