langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
53.23k stars 7.77k forks source link

fix: ignore empty outputs in Tool node #10988

Closed PedroGomes02 closed 4 days ago

PedroGomes02 commented 1 week ago

Summary

Modify _extract_tool_response_text to avoid adding empty elements to the list. Handle only tool_response messages of types TEXT and LINK, ensuring no empty elements are created in the list for other types of messages.

Fixes #10987

Checklist

[!IMPORTANT]
Please review the checklist below before submitting your pull request.