Skip to content

Commit e370eea

Browse files
glharperCopilot
andauthored
[AI] [Agents] correct convenience doc string for Bing Grounding (#41150)
* [AI] [Agents] correct convenience doc string for BIng Grounding * Update sdk/ai/azure-ai-agents/azure/ai/agents/models/_patch.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * update local variable name --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 55fd6e5 commit e370eea

File tree

1 file changed

+13
-10
lines changed
  • sdk/ai/azure-ai-agents/azure/ai/agents/models

1 file changed

+13
-10
lines changed

sdk/ai/azure-ai-agents/azure/ai/agents/models/_patch.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -848,15 +848,18 @@ class BingGroundingTool(Tool[BingGroundingToolDefinition]):
848848

849849
def __init__(self, connection_id: str, market: str = "", set_lang: str = "", count: int = 5, freshness: str = ""):
850850
"""
851-
Initialize Bing Custom Search with a connection_id.
852-
853-
:param connection_id: Connection ID used by tool. Bing Custom Search tools allow only one connection.
854-
:param market:
855-
:param set_lang:
856-
:param count:
857-
:param freshness:
858-
"""
859-
self.connection_ids = [
851+
Initialize Bing Grounding tool with a connection_id.
852+
853+
:param connection_id: Connection ID used by tool. Bing Grounding tools allow only one connection.
854+
:param market: The market where the results come from.
855+
:param set_lang: The language to use for user interface strings when calling Bing API.
856+
:param count: The number of search results to return in the Bing API response.
857+
:param freshness: Filter search results by a specific time range.
858+
859+
.. seealso::
860+
`Bing Web Search API Query Parameters <https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters>`_
861+
"""
862+
self._search_configurations = [
860863
BingGroundingSearchConfiguration(
861864
connection_id=connection_id, market=market, set_lang=set_lang, count=count, freshness=freshness
862865
)
@@ -871,7 +874,7 @@ def definitions(self) -> List[BingGroundingToolDefinition]:
871874
"""
872875
return [
873876
BingGroundingToolDefinition(
874-
bing_grounding=BingGroundingSearchToolParameters(search_configurations=self.connection_ids)
877+
bing_grounding=BingGroundingSearchToolParameters(search_configurations=self._search_configurations)
875878
)
876879
]
877880

0 commit comments

Comments
 (0)