Skip to content

Commit 21642d1

Browse files
Merge pull request #1966 from lindazqli/patch-15
Update bing-grounding.md
2 parents 536e881 + 53f5ff1 commit 21642d1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

articles/ai-services/agents/how-to/tools/bing-grounding.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Alternatively, you can also follow the step-by-step guide below:
9090

9191
## How to display Grounding with Bing Search results
9292

93-
According to Grounding with Bing's [terms of use and use and display requirements](https://www.microsoft.com/en-us/bing/apis/grounding-legal#use-and-display-requirements), you need to display both website URLs and Bing search query URLs in your custom interface. You can find website URLs through `annotations` parameter in API response and Bing search query URLs through `runstep` details.
93+
According to Grounding with Bing's [terms of use and use and display requirements](https://www.microsoft.com/en-us/bing/apis/grounding-legal#use-and-display-requirements), you need to display both website URLs and Bing search query URLs in your custom interface. You can find website URLs through `annotations` parameter in API response and Bing search query URLs through `runstep` details. To render the webpage, we recommend you replace the endpoint of Bing search query URLs with `www.bing.com` and your Bing search query URL would look like "https://www.bing.com/search?q={search query}"
9494

9595
```python
9696
run_steps = project_client.agents.list_run_steps(run_id=run.id, thread_id=thread.id)
@@ -254,6 +254,12 @@ Create a run and observe that the model uses the Grounding with Bing Search tool
254254
run = project_client.agents.create_and_process_run(thread_id=thread.id, assistant_id=agent.id)
255255
print(f"Run finished with status: {run.status}")
256256

257+
# Retrieve run step details to get Bing Search query link
258+
# To render the webpage, we recommend you replace the endpoint of Bing search query URLs with `www.bing.com` and your Bing search query URL would look like "https://www.bing.com/search?q={search query}"
259+
run_steps = project_client.agents.list_run_steps(run_id=run.id, thread_id=thread.id)
260+
run_steps_data = run_steps['data']
261+
print(f"Last run step detail: {run_steps_data}")
262+
257263
if run.status == "failed":
258264
print(f"Run failed: {run.last_error}")
259265

0 commit comments

Comments
 (0)