Use the bundled Python script to perform grounded searches using Azure Foundry's Agent Service and the Bing Grounding Search Tool.
```bash
pip install azure-identity azure-ai-agents
```
az login), OR DefaultAzureCredential or ClientSecretCredential. Add the following to your ~/.openclaw/.env file or export them in your shell:
```bash
# Your Azure AI Foundry project endpoint
FOUNDRY_PROJECT_ENDPOINT="https://
# The ID of the Bing Grounding connection in your Azure AI Foundry Project
BING_PROJECT_CONNECTION_ID="
# Default model deployment name (optional, defaults to gpt-4o)
FOUNDRY_MODEL_DEPLOYMENT_NAME="gpt-4o"
# (Optional) Service Principal Credentials if not using DefaultAzureCredential
AZURE_TENANT_ID="
AZURE_CLIENT_ID="
AZURE_CLIENT_SECRET="
```
Run from the OpenClaw workspace:
# Raw JSON output (default)
python3 {baseDir}/scripts/bing_grounding.py --query "What is the latest AI news today?"
# Markdown human-readable output
python3 {baseDir}/scripts/bing_grounding.py --query "What is the latest AI news today?" --format md
# Use a specific model deployment (default is gpt-4o)
python3 {baseDir}/scripts/bing_grounding.py --query "Weather in Seattle?" --model "gpt-4o-mini"
Returns a generated response synthesized by the Azure AI Agent based on Bing Search results, along with the source URL citations.
共 1 个版本