mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
How to add score_threshold and top_n in endpoint of rerank model #550
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mopemope-LeaF on GitHub (Aug 12, 2025).
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
I wrote a new plugin to expose model api by endpoint. The group yaml like this:
when selected rerank model in endpoin and save, the request is
to
http://localhost/console/api/workspaces/current/endpoints/updateand it failed without score_threshold and top_n.I notice plugin-daemon will validate config, the codes like this:
there are 2 questions:
2. Additional context or comments
No response
3. Can you help us with this feature?
@crazywoola commented on GitHub (Aug 13, 2025):
You can refer
https://github.com/langgenius/dify-official-plugins/commit/5f316efcf6fce3d74c5effdb2f1515891d121ba4
https://github.com/langgenius/dify-official-plugins/blob/b93aa1f214276a77e07c3b37f7d42038e4d3e7b4/models/openai_api_compatible/models/rerank/rerank.py#L35
Some of them are hard coded.
@dosubot[bot] commented on GitHub (Aug 30, 2025):
Hi, @mopemope-LeaF. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
score_thresholdandtop_nto the rerank model endpoint.Next Steps:
Thanks for your understanding and contribution!