With emma's Dify integration, you can use chat apps, text generation, workflow execution, and conversation management. Integrate with a no-code platform for building and operating AI applications.
Features
difyPage.features.authentication.title
difyPage.features.authentication.method:API Key
difyPage.features.authentication.description
Dify_Operator supports the following 11 tools:
Category
Tools
Chat & Text Generation
2
Tool Name
Description
dify_chat_message
Send a message to a chat app (supports conversation continuation)
dify_completion_message
Send a request to a text generation app
Workflow
2
Tool Name
Description
dify_run_workflow
Run a workflow app
dify_stop_workflow
Stop a running workflow
Conversation Management
4
Tool Name
Description
dify_list_conversations
List conversations
dify_get_conversation_messages
Get message history for a conversation
dify_delete_conversation
Delete a conversation
dify_rename_conversation
Rename a conversation
Feedback
1
Tool Name
Description
dify_message_feedback
Send feedback (like/dislike) for a message
App Info
2
Tool Name
Description
dify_get_app_parameters
Get app parameter settings
dify_get_app_meta
Get app metadata
Main Parameters
Parameter
Description
query
User's message/question
conversation_id
Conversation ID to continue
inputs
Input variables (JSON format)
task_id
Workflow task ID
message_id
Message ID
rating
Rating (like, dislike, null)
Prerequisites
• emma account
• Dify account (cloud or self-hosted)
• Dify API key
Setup
1. Install the package
npm install @duzzle/dify-integration
2. Initialize
import { DuzzleDify } from '@duzzle/dify-integration';
const dify = new DuzzleDify({
apiKey: process.env.DUZZLE_API_KEY,
difyApiKey: process.env.DIFY_API_KEY,
difyBaseUrl: process.env.DIFY_BASE_URL // optional
});
3. Send Chat Message
// Send a chat message
const result = await dify.chatMessage({
query: 'What is the weather today?',
conversation_id: 'conv_123', // optional
inputs: { language: 'en' }
});
console.log('Response:', result.answer);
console.log('Conversation ID:', result.conversation_id);