dify icon indicating copy to clipboard operation
dify copied to clipboard

feat: Add Citations and Attributions to Agent Node

Open chiehw opened this issue 8 months ago • 2 comments

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

  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.

  • [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) and cd web && npx lint-staged(frontend) to appease the lint gods

chiehw avatar Apr 22 '25 09:04 chiehw

Please approve it. @crazywoola

oneness0 avatar Apr 28 '25 07:04 oneness0

In the official environment, after upgrading the agent policy plugin to the latest version, I still cannot achieve the agent node reference display functionality.

zhudongwork avatar Jul 24 '25 12:07 zhudongwork