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
35.59k stars 4.8k forks source link

fix: tool call message role according to credentials #5625

Closed sunxichen closed 2 days ago

sunxichen commented 3 days ago

Description

Distinguishing the tool message role in two scenarios: When using Tool Call as the Function Calling method, the message role should be tool; whereas, when employing Function Call as the Function Calling method, the message role should be function.

Fixes #5622

Type of Change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Suggested Checklist:

Yeuoly commented 2 days ago

beautiful fixing, thanks for your contributions!