[PR #18558] feat: Add Citations and Attributions to Agent Node #28951

Closed
opened 2026-02-21 20:44:34 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/18558

State: closed
Merged: Yes


Fixes #17986

Related PR:

Summary

  1. 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]"
  1. Support retriever_resources type messages: This feature allow agent strategy return Citations and Attributions.

Screenshots

Before After
image image1745846930111_8D0B88E3-20B2-4b4c-972A-2E31E8873054

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/18558 **State:** closed **Merged:** Yes --- 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 - [x] https://github.com/langgenius/dify-official-plugins/pull/895 # Summary 1. Support var-selector type parameters(Prerequisites): This parameter supports the use of scope to configure the selectable variable type. The optional scope is: ```python 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]" ``` 2. Support retriever_resources type messages: This feature allow agent strategy return Citations and Attributions. # Screenshots | Before | After | |--------|-------| | ![image](https://github.com/user-attachments/assets/f3e09652-7f0f-4e3a-91f9-256b4a326d1b) | ![image](https://github.com/user-attachments/assets/62b3ec23-52dd-4dcd-8e5f-f43bce860f06)![1745846930111_8D0B88E3-20B2-4b4c-972A-2E31E8873054](https://github.com/user-attachments/assets/67f0d282-c814-4dba-892d-28a0cdeb1bd8) | # Checklist > [!IMPORTANT] > Please review the checklist below before submitting your pull request. - [x] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [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) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:44:34 -05:00
yindo closed this issue 2026-02-21 20:44:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#28951