dify
dify copied to clipboard
feat: Add Citations and Attributions to Agent Node
Fixes #17986
Related PR:
- [x] https://github.com/langgenius/dify-plugin-sdks/pull/107
- [x] https://github.com/langgenius/dify-plugin-daemon/pull/236
- [x] https://github.com/langgenius/dify-plugin-sdks/pull/123
- [x] https://github.com/langgenius/dify-official-plugins/pull/814
- [x] https://github.com/langgenius/dify-plugin-daemon/pull/253
- [ ] https://github.com/langgenius/dify-official-plugins/pull/895
Summary
- Support var-selector type parameters(Prerequisites): This parameter supports the use of scope to configure the selectable variable type. The optional scope is:
class DefaultValueType(StrEnum):
STRING = "string"
NUMBER = "number"
OBJECT = "object"
ARRAY_NUMBER = "array[number]"
ARRAY_STRING = "array[string]"
ARRAY_OBJECT = "array[object]"
ARRAY_FILES = "array[file]"
- Support retriever_resources type messages: This feature allow agent strategy return Citations and Attributions.
Screenshots
| Before | After |
|---|---|
Checklist
[!IMPORTANT]
Please review the checklist below before submitting your pull request.
- [x] This change requires a documentation update, included: Dify Document
- [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
- [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
- [x] I've updated the documentation accordingly.
- [x] I ran
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods
Please approve it. @crazywoola
In the official environment, after upgrading the agent policy plugin to the latest version, I still cannot achieve the agent node reference display functionality.