-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Object type in the custom tool via OpenAPI. #9025
Comments
@tipani86 Hello there! I'm here to help you with bugs, questions, or becoming a contributor. Let's get this issue sorted out together! The issue you're experiencing with the parameter being interpreted as To address this, ensure that the OpenAPI schema correctly specifies default values for all parameters, or explicitly set the values in your test to avoid relying on defaults. Additionally, verify that the request body is correctly formatted as JSON and that the |
As can be seen in the provided screenshot, I am filling all the parameters (and all of them are mandatory, not optional, per the schema. So there should not be any default values being in use in the actual call that goes out. |
Update: For now, I have been able to work around the issue by breaking the inner object of the original field |
Hi, @tipani86! I'm helping the Dify team manage their backlog and am marking this issue as stale. From your report, it seems that you encountered a bug in Dify version 0.8.3 related to parameter validation in object format, which consistently shows as "none." You mentioned finding a workaround by flattening the object structure, but this isn't a viable solution for third-party APIs. Dosubot provided some suggestions regarding the OpenAPI schema and request body formatting, but the issue remains unresolved. Could you please let us know if this issue is still relevant to the latest version of the Dify repository? If it is, feel free to comment here to keep it open. Otherwise, you can close the issue yourself, or it will be automatically closed in 7 days. Thank you! |
I haven't tried with the breaking API data structure lately, but since nobody has commented on this issue, my assumption is it's not been addressed yet. |
@tipani86 its from pydantic side and fixed in v2 you can check here. @laipz8200 do we need to fix this by the example in the discuss |
I think it's because we do not yet support the |
Self Checks
Dify version
0.8.3
Cloud or Self Hosted
Cloud
Steps to reproduce
✔️ Expected Behavior
All parameters pass validation.
❌ Actual Behavior
One parameter, which is in object (dict) format, failed validation. Error message says it shows as
none
. It doesn't matter if I wrote something else in this parameter value (like integer or string), the validation error will always show asnone
, like depicted in the screenshot.The text was updated successfully, but these errors were encountered: