Implemented [Dify.AI](https://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 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced the ability to create chat messages within the Dify platform. - Added secure authentication for Dify.AI accounts. - Implemented a new Dify.AI block with integrated chat message creation and logo display. - Enabled Dify.AI block in the repository for user access. - **Enhancements** - Enhanced security for API key input by changing it to a password field. - **Documentation** - Included new types to support Dify AI service responses. - **Refactor** - Updated schema imports and array listings to include the new Dify.AI block. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Baptiste Arnaud <baptiste.arnaud95@gmail.com>
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
// Do not edit this file manually
|
|
import { difyAi } from '@typebot.io/dify-ai-block'
|
|
import { mistral } from '@typebot.io/mistral-block'
|
|
import { qrCode } from '@typebot.io/qrcode-block'
|
|
import { chatNode } from '@typebot.io/chat-node-block'
|
|
import { calCom } from '@typebot.io/cal-com-block'
|
|
import { zemanticAi } from '@typebot.io/zemantic-ai-block'
|
|
import { openAIBlock } from '@typebot.io/openai-block'
|
|
import {
|
|
BlockDefinition,
|
|
parseBlockCredentials,
|
|
parseBlockSchema,
|
|
} from '@typebot.io/forge'
|
|
import { enabledBlocks } from '@typebot.io/forge-repository'
|
|
import { z } from '@typebot.io/forge/zod'
|
|
|
|
export const forgedBlocks = [
|
|
openAIBlock,
|
|
zemanticAi,
|
|
calCom,
|
|
chatNode,
|
|
qrCode,
|
|
difyAi,
|
|
mistral
|
|
] as BlockDefinition<(typeof enabledBlocks)[number], any, any>[]
|
|
|
|
export type ForgedBlockDefinition = (typeof forgedBlocks)[number]
|
|
|
|
export const forgedBlockSchemas = forgedBlocks.map(parseBlockSchema)
|
|
export type ForgedBlock = z.infer<(typeof forgedBlockSchemas)[number]>
|
|
|
|
export const forgedCredentialsSchemas = forgedBlocks
|
|
.filter((b) => b.auth)
|
|
.map(parseBlockCredentials)
|