-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
When publishing workflow as tool, it does not show up in Tools #4697
Comments
The issue you're experiencing, where the workflow does not show up in the Tools section when published, despite appearing correctly in the studio interface, could be due to the filtering logic in the Here is the relevant code snippet that filters the collection list: const filteredCollectionList = useMemo(() => {
return collectionList.filter((collection) => {
if (collection.type !== activeTab)
return false
if (tagFilterValue.length > 0 && (!collection.labels || collection.labels.every(label => !tagFilterValue.includes(label))))
return false
if (keywords)
return collection.name.toLowerCase().includes(keywords.toLowerCase())
return true
})
}, [activeTab, tagFilterValue, keywords, collectionList]) Ensure that:
Additionally, ensure that the workflow is not marked as outdated. The const outdated = useMemo(() => {
if (!detail)
return false
if (detail.tool.parameters.length !== inputs?.length) {
return true
}
else {
for (const item of inputs || []) {
const param = detail.tool.parameters.find(toolParam => toolParam.name === item.variable)
if (!param) {
return true
}
else if (param.required !== item.required) {
return true
}
else {
if (item.type === 'paragraph' && param.type !== 'string')
return true
if (param.type !== item.type && !(param.type === 'string' && item.type === 'paragraph'))
return true
}
}
}
return false
}, [detail, inputs]) If any of these conditions are not met, the workflow will not appear in the Tools section. Additionally, in a self-hosted environment, ensure that the necessary services are correctly configured and running. For example, the version: '3'
services:
api:
image: langgenius/dify-api:0.6.9
restart: always
environment:
MODE: api
LOG_LEVEL: INFO
SECRET_KEY: sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U
MIGRATION_ENABLED: 'true'
DB_USERNAME: postgres
DB_PASSWORD: difyai123456
DB_HOST: db
DB_PORT: 5432
DB_DATABASE: dify
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: difyai123456
CELERY_BROKER_URL: redis://:difyai123456@redis:6379/1
depends_on:
- db
- redis
volumes:
- ./volumes/app/storage:/app/api/storage
networks:
- ssrf_proxy_network
- default
web:
image: langgenius/dify-web:0.6.9
restart: always
environment:
CONSOLE_API_URL: ''
APP_API_URL: ''
networks:
- default
nginx:
image: nginx:latest
restart: always
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/conf.d:/etc/nginx/conf.d
depends_on:
- api
- web
ports:
- "80:80"
networks:
ssrf_proxy_network:
driver: bridge
internal: true
default:
driver: bridge Ensure that all services are up and running, and that there are no network issues preventing the frontend from communicating with the backend. Additionally, ensure that the workflow provider details are correctly fetched and displayed. The const getWorkflowToolProvider = useCallback(async () => {
setIsDetailLoading(true)
const res = await fetchWorkflowToolDetail(collection.id)
const payload = {
...res,
parameters: res.tool?.parameters.map((item) => {
return {
name: item.name,
description: item.llm_description,
form: item.form,
required: item.required,
type: item.type,
}
}) || [],
labels: res.tool?.labels || [],
}
setCustomCollection(payload)
setIsDetailLoading(false)
}, [collection.id]) Ensure that the
|
Well, works for me. Try refresh and see the console logs (if any errors) - if not would be nice to see container logs (api). |
Found the error ,was something on my side. |
Self Checks
Dify version
0.6.9
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
There seems to be an issue when publishing workflows as tools that they don't show up in the ProviderList:
But I can see them in the studio:
✔️ Expected Behavior
Show workflow as tools, just as on cloud.
❌ Actual Behavior
Empty view. When adding debug to web/app/components/tools/provider-list.tsx there seem to be a mismatch between the
useEffect for the active tab, and the Collection type
"Collection type: builtin Active tab: workflow"
The text was updated successfully, but these errors were encountered: