docs: add bing search tool to ms platform (#23183)

- [x] **Lint and test**: Run `make format`, `make lint` and `make test`
from the root of the package(s) you've modified. See contribution
guidelines for more: https://python.langchain.com/docs/contributing/
This commit is contained in:
Qingchuan Hao 2024-06-20 00:43:05 +08:00 committed by GitHub
parent 505a2e8743
commit 9b82707ea6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 2 deletions

View File

@ -312,7 +312,7 @@ from langchain.retrievers import AzureAISearchRetriever
### Azure Container Apps dynamic sessions ### Azure Container Apps dynamic sessions
We need to get the `POOL_MANAGEMENT_ENDPOINT` environment variable from the Azure Container Apps service. We need to get the `POOL_MANAGEMENT_ENDPOINT` environment variable from the Azure Container Apps service.
See the instructions [here](https://python.langchain.com/v0.2/docs/integrations/tools/azure_dynamic_sessions/#setup). See the instructions [here](/docs/integrations/tools/azure_dynamic_sessions/#setup).
We need to install a python package. We need to install a python package.
@ -326,6 +326,19 @@ See a [usage example](/docs/integrations/tools/azure_dynamic_sessions).
from langchain_azure_dynamic_sessions import SessionsPythonREPLTool from langchain_azure_dynamic_sessions import SessionsPythonREPLTool
``` ```
### Bing Search
Follow the documentation [here](/docs/integrations/tools/bing_search) to get a detail explanations and instructions of this tool.
The environment variable `BING_SUBSCRIPTION_KEY` and `BING_SEARCH_URL` are required from Bing Search resource.
```bash
from langchain_community.tools.bing_search import BingSearchResults
from langchain_community.utilities import BingSearchAPIWrapper
api_wrapper = BingSearchAPIWrapper()
tool = BingSearchResults(api_wrapper=api_wrapper)
```
## Toolkits ## Toolkits

View File

@ -6,7 +6,7 @@
"source": [ "source": [
"# Bing Search\n", "# Bing Search\n",
"\n", "\n",
"[Microsoft Bing](https://www.bing.com/), commonly referred to as `Bing` or `Bing Search`, is a web search engine owned and operated by `Microsoft`." "> [Bing Search](https://learn.microsoft.com/en-us/bing/search-apis/bing-web-search/) is an Azure service and enables safe, ad-free, location-aware search results, surfacing relevant information from billions of web documents. Help your users find what they're looking for from the world-wide-web by harnessing Bing's ability to comb billions of webpages, images, videos, and news with a single API call. "
] ]
}, },
{ {