dify
dify copied to clipboard
Bing search bug
Self Checks
- [X] This is only for bug report, if you would like to ask a quesion, please head to Discussions.
- [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] Pleas do not modify this template :) and fill in all the required fields.
Dify version
0.6.2
Cloud or Self Hosted
Cloud, Self Hosted (Docker), Self Hosted (Source)
Steps to reproduce
I always encounter invoke url error when using bing search.
So I dig into the source code. The search setting is as below:
But the real thing is the filters are all setting as true, as below
So the backend request url is:
https://api.bing.microsoft.com/v7.0/search?q={query_string}&mkt=en-US&count=5&responseFilter=Computation,Entities,News, RelatedSearches,WebPages
So if all the filters are true, bing will raise a error: 403 forbidden.
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
It looks like the issue with the Bing search in Dify might be due to a misconfiguration or an issue with the Bing Search API itself. Here's a more focused approach to troubleshoot and potentially resolve the issue:
-
Configuration in Dify: Ensure the
bing_web_search.yaml
reflects your desired settings, especially that non-webpage search options are set tofalse
. This file dictates the default parameter values and can be found in the Dify codebase. -
Docker Setup: Verify your Docker environment is correctly configured to apply changes. This includes ensuring the configuration file is correctly mapped and reloaded.
-
Clear Caches/Restart: Clear any application-level caches or restart the application within Docker to apply new settings.
-
Check for Known Bugs: Investigate any known issues with Dify version 0.6.2 that might affect settings, though no specific bugs related to this issue were found at the time of writing.
If the problem persists, consider these steps related to the Bing Search API:
-
Subscription Key: Confirm the
subscription_key
is valid and not expired, as a403 forbidden
error often points to permission issues. -
API Endpoint and Parameters: Ensure you're using the correct API endpoint and that the
market
andlang
parameters are correctly formatted. -
Rate Limits and IP Restrictions: Check if you've exceeded API call rate limits or if there are any IP restrictions in place that might be causing the
403 forbidden
error. -
Region-Specific Restrictions: Verify there are no restrictions in your region that could affect access to the Bing Search API.
If after these steps the issue is not resolved, reaching out to Microsoft Azure support might be necessary for further assistance.
Sources
- Bing search tool option set not work at backend
- api/core/tools/provider/builtin/bing/tools/bing_web_search.py
- api/core/tools/provider/builtin/bing/tools/bing_web_search.yaml
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
Pls check your Bing Search subscription plan, for different subscription plans, different filters are permitted, I have tested a basic plan, which can only support webpage search.
There is still bug:
enties search is not disabled.
+1, I also encountered same problem
The temporary solution was that I switched to a different subscription group