fix: update dify knowledge retrieval payload (#14246)

### What this PR does

| Before  | After |
| ---- | --- |
| <img height="500" alt="CleanShot 2026-04-14 at 17 42 31@2x"
src="https://github.com/user-attachments/assets/0fc741a6-1604-466f-85a9-be95045cec72"
/> | <img height="500" alt="CleanShot 2026-04-14 at 17 42 15@2x"
src="https://github.com/user-attachments/assets/4466ef62-c802-413f-b6a8-7466c97effad"
/> |


<!-- (optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)`
format, will close the issue(s) when PR gets merged)*: -->

Fixes #14244

### Why we need it and why it was done in this way

The following tradeoffs were made:

The following alternatives were considered:

Links to places where the discussion took place: <!-- optional: slack,
other GH issue, mailinglist, ... -->

### Breaking changes

<!-- optional -->

If this PR introduces breaking changes, please describe the changes and
the impact on users.

### Special notes for your reviewer

<!-- optional -->

### Checklist

This checklist is not enforcing, but it's a reminder of items that could
be relevant to every PR.
Approvers are expected to review this list.

- [x] PR: The PR description is expressive enough and will help future
contributors
- [x] Code: [Write code that humans can
understand](https://en.wikiquote.org/wiki/Martin_Fowler#code-for-humans)
and [Keep it simple](https://en.wikipedia.org/wiki/KISS_principle)
- [ ] Refactor: You have [left the code cleaner than you found it (Boy
Scout
Rule)](https://learning.oreilly.com/library/view/97-things-every/9780596809515/ch08.html)
- [ ] Upgrade: Impact of this change on upgrade flows was considered and
addressed if required
- [ ] Documentation: A [user-guide update](https://docs.cherry-ai.com)
was considered and is present (link) or not required. Check this only
when the PR introduces or changes a user-facing feature or behavior.
- [x] Self-review: I have reviewed my own code (e.g., via
[`/gh-pr-review`](/.claude/skills/gh-pr-review/SKILL.md), `gh pr diff`,
or GitHub UI) before requesting review from others

### Release note

<!--  Write your release note:
1. Enter your extended release note in the below block. If the PR
requires additional action from users switching to the new release,
include the string "action required".
2. If no release note is required, just write "NONE".
3. Only include user-facing changes (new features, bug fixes visible to
users, UI changes, behavior changes). For CI, maintenance, internal
refactoring, build tooling, or other non-user-facing work, write "NONE".
-->

```release-note
Fixed Dify knowledge search compatibility with Dify 1.13.3.
```

Signed-off-by: Konv Suu <hi@kovsu.com>
This commit is contained in:
Konv Suu
2026-04-14 18:50:29 +08:00
committed by GitHub
parent 0d7e13bd48
commit e2366b351f

View File

@@ -198,8 +198,9 @@ class DifyKnowledgeServer {
retrieval_model: {
top_k: topK,
// will be error if not set
reranking_enable: null,
score_threshold_enabled: null
search_method: 'semantic_search',
reranking_enable: false,
score_threshold_enabled: false
}
})
})