Dify NodeJs Extension Template
- Clone this repository
- Edit
expectedApiKey
in index.js
to match your API key
- Run
npm install
- Run
npm run start
curl --location 'http://localhost:3000/api/dify/receive' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 123456' \
--data '{
"point": "ping"
}'
Point: app.external_data_tool.query
{
"point": "app.external_data_tool.query",
"params": {
"app_id": "61248ab4-1125-45be-ae32-0ce91334d021",
"tool_variable": "menu",
"inputs": {
"choice": "foods"
},
"query": "Give me something to eat?"
}
}
curl --location 'http://localhost:3000/api/dify/receive' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 123456' \
--data '{
"point": "app.external_data_tool.query",
"params": {
"app_id": "61248ab4-1125-45be-ae32-0ce91334d021",
"tool_variable": "menu",
"inputs": {
"choice": "foods"
},
"query": "Give me something to eat?"
}
}'