dify
dify copied to clipboard
How to partially pre-define variables in custom tool?
Self Checks
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
1. Is this request related to a challenge you're experiencing? Tell me about your story.
I was wondering if I could partially pre-define API variables in custom tool? Say I have a retrieval api binded to a knowledge base, apparently LLM wouldn't know my knowledge base id in advance by any chance. (Don't want to redirect api by other firmware like nginx etc.)
- The OpenAI Swagger schema in my interpretation is just for API definition and does not seem to me can add any default value.
- Tried add my custom tool to a workflow, but only tools and plug-ins are visible under Agent.
Let me know if there is any other straightforward way to get it working, Cheers.
2. Additional context or comments
No response
3. Can you help us with this feature?
- [ ] I am interested in contributing to this feature.
Hi, @hh2712. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.
Issue Summary:
- You requested assistance with pre-defining API variables in a custom tool for a retrieval API connected to a knowledge base.
- You noted that the OpenAI Swagger schema lacks support for default values.
- You mentioned that your custom tool is not appearing in the workflow under Agent.
- You're seeking a simple solution to address these challenges.
- No comments or developments have been made on the issue yet.
Next Steps:
- Please let me know if this issue is still relevant to the latest version of the Dify repository by commenting here to keep the discussion open.
- If no updates are provided, this issue will be automatically closed in 15 days.
Thank you for your understanding and contribution!