diff --git a/sdk/ai/azure-ai-agents/CHANGELOG.md b/sdk/ai/azure-ai-agents/CHANGELOG.md index 1dbf4ab1ec16..2f98c41c43fe 100644 --- a/sdk/ai/azure-ai-agents/CHANGELOG.md +++ b/sdk/ai/azure-ai-agents/CHANGELOG.md @@ -2,7 +2,7 @@ # Release History -## 1.2.0b5 (Unreleased) +## 1.2.0b5 (2025-09-29) ### Features Added - Added `run_handler` parameter to `runs.create_and_process` allowing to make function tool calls manually or approve mcp tool calls. diff --git a/sdk/ai/azure-ai-agents/azure/ai/agents/_utils/model_base.py b/sdk/ai/azure-ai-agents/azure/ai/agents/_utils/model_base.py index 12926fa98dcf..512d10f7c64a 100644 --- a/sdk/ai/azure-ai-agents/azure/ai/agents/_utils/model_base.py +++ b/sdk/ai/azure-ai-agents/azure/ai/agents/_utils/model_base.py @@ -1,4 +1,3 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/ai/azure-ai-agents/azure/ai/agents/_utils/serialization.py b/sdk/ai/azure-ai-agents/azure/ai/agents/_utils/serialization.py index 45a3e44e45cb..ca637bc95e2e 100644 --- a/sdk/ai/azure-ai-agents/azure/ai/agents/_utils/serialization.py +++ b/sdk/ai/azure-ai-agents/azure/ai/agents/_utils/serialization.py @@ -1,4 +1,3 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/ai/azure-ai-agents/azure/ai/agents/aio/operations/_operations.py b/sdk/ai/azure-ai-agents/azure/ai/agents/aio/operations/_operations.py index b143078c6ff4..8151b09585e2 100644 --- a/sdk/ai/azure-ai-agents/azure/ai/agents/aio/operations/_operations.py +++ b/sdk/ai/azure-ai-agents/azure/ai/agents/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/ai/azure-ai-agents/azure/ai/agents/models/_models.py b/sdk/ai/azure-ai-agents/azure/ai/agents/models/_models.py index e3d87a927820..1dbc92b15145 100644 --- a/sdk/ai/azure-ai-agents/azure/ai/agents/models/_models.py +++ b/sdk/ai/azure-ai-agents/azure/ai/agents/models/_models.py @@ -1,4 +1,3 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -892,15 +891,51 @@ class BingCustomSearchConfiguration(_Model): :vartype connection_id: str :ivar instance_name: Name of the custom configuration instance given to config. Required. :vartype instance_name: str - :ivar market: The market where the results come from. + :ivar market: The market where the results come from. Typically, market is the country where + the user is making the request from. However, it could be a different country if the user is + not located in a country where Bing delivers results. The market must be in the form: + ``-`` where ```` is an ISO 639-1 language code (neutral + culture) and ```` is an ISO 3166 country/region (specific culture) code. For + example, ``en-US``. The string is case insensitive. For a list of possible market values, see + `Market codes + `_. If + known, you are encouraged to always specify the market. Specifying the market helps Bing route + the request and return an appropriate and optimal response. If you specify a market that is not + listed in Market codes, Bing uses a best fit market code based on an internal mapping that is + subject to change. :vartype market: str - :ivar set_lang: The language to use for user interface strings when calling Bing API. + :ivar set_lang: The language to use for user interface strings. You may specify the language + using either a 2-letter or 4-letter code. Using 4-letter codes is preferred. + For a list of supported language codes, see `Bing supported languages + `_. + Bing loads the localized strings if this parameter contains a valid 2-letter neutral culture + code (for example ``fr``) or a valid 4-letter specific culture code (``fr-ca``). For example, + for ``fr-ca``, Bing loads the ``fr`` neutral culture code strings. + If the parameter is not valid (for example, ``zh``) or Bing doesn’t support the language (for + example, ``af``, ``af-na``), Bing defaults to ``en`` (English). + To specify the 2-letter code, set this parameter to an ISO 639-1 language code. + To specify the 4-letter code, use the form ``-`` where ```` + is an ISO 639-1 language code (neutral culture) and ```` is an ISO 3166 + country/region (specific culture) code. For example, use ``en-US`` for United States English. + Although optional, you should always specify the language. Typically, you set this parameter to + the same language specified by the market value unless the user wants the user interface + strings displayed in a different language. :vartype set_lang: str - :ivar count: The number of search results to return in the bing api response. + :ivar count: The number of search results to return in the response. The default is 5 and the + maximum value is 50. The actual number delivered may be less than requested. + + * It is possible for multiple pages to include some overlap in results. + * This parameter affects only web page results. It's possible that AI model might not use all + search results returned by Bing. :vartype count: int - :ivar freshness: Filter search results by a specific time range. Accepted values: - `https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters - `_. + :ivar freshness: Filter search results by the following case-insensitive age values: + + * Day: Return webpages that Bing discovered within the last 24 hours. + * Week: Return webpages that Bing discovered within the last 7 days. + * Month: Return webpages that Bing discovered within the last 30 days. To get articles + discovered by Bing during a specific timeframe, specify a date range in the form: + `YYYY-MM-DD..YYYY-MM-DD`. For example, `freshness=2019-02-01..2019-05-30. To limit the results + to a single date, set this parameter to a specific date. For example, freshness=2019-02-04`. :vartype freshness: str """ @@ -909,15 +944,51 @@ class BingCustomSearchConfiguration(_Model): instance_name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Name of the custom configuration instance given to config. Required.""" market: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The market where the results come from.""" + """The market where the results come from. Typically, market is the country where the user is + making the request from. However, it could be a different country if the user is not located in + a country where Bing delivers results. The market must be in the form: + ``-`` where ```` is an ISO 639-1 language code (neutral + culture) and ```` is an ISO 3166 country/region (specific culture) code. For + example, ``en-US``. The string is case insensitive. For a list of possible market values, see + `Market codes + `_. If + known, you are encouraged to always specify the market. Specifying the market helps Bing route + the request and return an appropriate and optimal response. If you specify a market that is not + listed in Market codes, Bing uses a best fit market code based on an internal mapping that is + subject to change.""" set_lang: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The language to use for user interface strings when calling Bing API.""" + """The language to use for user interface strings. You may specify the language using either a + 2-letter or 4-letter code. Using 4-letter codes is preferred. + For a list of supported language codes, see `Bing supported languages + `_. + Bing loads the localized strings if this parameter contains a valid 2-letter neutral culture + code (for example ``fr``) or a valid 4-letter specific culture code (``fr-ca``). For example, + for ``fr-ca``, Bing loads the ``fr`` neutral culture code strings. + If the parameter is not valid (for example, ``zh``) or Bing doesn’t support the language (for + example, ``af``, ``af-na``), Bing defaults to ``en`` (English). + To specify the 2-letter code, set this parameter to an ISO 639-1 language code. + To specify the 4-letter code, use the form ``-`` where ```` + is an ISO 639-1 language code (neutral culture) and ```` is an ISO 3166 + country/region (specific culture) code. For example, use ``en-US`` for United States English. + Although optional, you should always specify the language. Typically, you set this parameter to + the same language specified by the market value unless the user wants the user interface + strings displayed in a different language.""" count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The number of search results to return in the bing api response.""" + """The number of search results to return in the response. The default is 5 and the maximum value + is 50. The actual number delivered may be less than requested. + + * It is possible for multiple pages to include some overlap in results. + * This parameter affects only web page results. It's possible that AI model might not use all + search results returned by Bing.""" freshness: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Filter search results by a specific time range. Accepted values: - `https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters - `_.""" + """Filter search results by the following case-insensitive age values: + + * Day: Return webpages that Bing discovered within the last 24 hours. + * Week: Return webpages that Bing discovered within the last 7 days. + * Month: Return webpages that Bing discovered within the last 30 days. To get articles + discovered by Bing during a specific timeframe, specify a date range in the form: + `YYYY-MM-DD..YYYY-MM-DD`. For example, `freshness=2019-02-01..2019-05-30. To limit the results + to a single date, set this parameter to a specific date. For example, freshness=2019-02-04`.""" @overload def __init__( @@ -1017,30 +1088,102 @@ class BingGroundingSearchConfiguration(_Model): :ivar connection_id: Connection id for grounding with bing search. Required. :vartype connection_id: str - :ivar market: The market where the results come from. + :ivar market: The market where the results come from. Typically, market is the country where + the user is making the request from. However, it could be a different country if the user is + not located in a country where Bing delivers results. The market must be in the form: + ``-`` where ```` is an ISO 639-1 language code (neutral + culture) and ```` is an ISO 3166 country/region (specific culture) code. For + example, ``en-US``. The string is case insensitive. For a list of possible market values, see + `Market codes + `_. If + known, you are encouraged to always specify the market. Specifying the market helps Bing route + the request and return an appropriate and optimal response. If you specify a market that is not + listed in Market codes, Bing uses a best fit market code based on an internal mapping that is + subject to change. :vartype market: str - :ivar set_lang: The language to use for user interface strings when calling Bing API. + :ivar set_lang: The language to use for user interface strings. You may specify the language + using either a 2-letter or 4-letter code. Using 4-letter codes is preferred. + For a list of supported language codes, see `Bing supported languages + `_. + Bing loads the localized strings if this parameter contains a valid 2-letter neutral culture + code (for example ``fr``) or a valid 4-letter specific culture code (``fr-ca``). For example, + for ``fr-ca``, Bing loads the ``fr`` neutral culture code strings. + If the parameter is not valid (for example, ``zh``) or Bing doesn’t support the language (for + example, ``af``, ``af-na``), Bing defaults to ``en`` (English). + To specify the 2-letter code, set this parameter to an ISO 639-1 language code. + To specify the 4-letter code, use the form ``-`` where ```` + is an ISO 639-1 language code (neutral culture) and ```` is an ISO 3166 + country/region (specific culture) code. For example, use ``en-US`` for United States English. + Although optional, you should always specify the language. Typically, you set this parameter to + the same language specified by the market value unless the user wants the user interface + strings displayed in a different language. :vartype set_lang: str - :ivar count: The number of search results to return in the bing api response. + :ivar count: The number of search results to return in the response. The default is 5 and the + maximum value is 50. The actual number delivered may be less than requested. + + * It is possible for multiple pages to include some overlap in results. + * This parameter affects only web page results. It's possible that AI model might not use all + search results returned by Bing. :vartype count: int - :ivar freshness: Filter search results by a specific time range. Accepted values: - `https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters - `_. + :ivar freshness: Filter search results by the following case-insensitive age values: + + * Day: Return webpages that Bing discovered within the last 24 hours. + * Week: Return webpages that Bing discovered within the last 7 days. + * Month: Return webpages that Bing discovered within the last 30 days. To get articles + discovered by Bing during a specific timeframe, specify a date range in the form: + `YYYY-MM-DD..YYYY-MM-DD`. For example, `freshness=2019-02-01..2019-05-30. To limit the results + to a single date, set this parameter to a specific date. For example, freshness=2019-02-04`. :vartype freshness: str """ connection_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Connection id for grounding with bing search. Required.""" market: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The market where the results come from.""" + """The market where the results come from. Typically, market is the country where the user is + making the request from. However, it could be a different country if the user is not located in + a country where Bing delivers results. The market must be in the form: + ``-`` where ```` is an ISO 639-1 language code (neutral + culture) and ```` is an ISO 3166 country/region (specific culture) code. For + example, ``en-US``. The string is case insensitive. For a list of possible market values, see + `Market codes + `_. If + known, you are encouraged to always specify the market. Specifying the market helps Bing route + the request and return an appropriate and optimal response. If you specify a market that is not + listed in Market codes, Bing uses a best fit market code based on an internal mapping that is + subject to change.""" set_lang: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The language to use for user interface strings when calling Bing API.""" + """The language to use for user interface strings. You may specify the language using either a + 2-letter or 4-letter code. Using 4-letter codes is preferred. + For a list of supported language codes, see `Bing supported languages + `_. + Bing loads the localized strings if this parameter contains a valid 2-letter neutral culture + code (for example ``fr``) or a valid 4-letter specific culture code (``fr-ca``). For example, + for ``fr-ca``, Bing loads the ``fr`` neutral culture code strings. + If the parameter is not valid (for example, ``zh``) or Bing doesn’t support the language (for + example, ``af``, ``af-na``), Bing defaults to ``en`` (English). + To specify the 2-letter code, set this parameter to an ISO 639-1 language code. + To specify the 4-letter code, use the form ``-`` where ```` + is an ISO 639-1 language code (neutral culture) and ```` is an ISO 3166 + country/region (specific culture) code. For example, use ``en-US`` for United States English. + Although optional, you should always specify the language. Typically, you set this parameter to + the same language specified by the market value unless the user wants the user interface + strings displayed in a different language.""" count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The number of search results to return in the bing api response.""" + """The number of search results to return in the response. The default is 5 and the maximum value + is 50. The actual number delivered may be less than requested. + + * It is possible for multiple pages to include some overlap in results. + * This parameter affects only web page results. It's possible that AI model might not use all + search results returned by Bing.""" freshness: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Filter search results by a specific time range. Accepted values: - `https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters - `_.""" + """Filter search results by the following case-insensitive age values: + + * Day: Return webpages that Bing discovered within the last 24 hours. + * Week: Return webpages that Bing discovered within the last 7 days. + * Month: Return webpages that Bing discovered within the last 30 days. To get articles + discovered by Bing during a specific timeframe, specify a date range in the form: + `YYYY-MM-DD..YYYY-MM-DD`. For example, `freshness=2019-02-01..2019-05-30. To limit the results + to a single date, set this parameter to a specific date. For example, freshness=2019-02-04`.""" @overload def __init__( diff --git a/sdk/ai/azure-ai-agents/azure/ai/agents/operations/_operations.py b/sdk/ai/azure-ai-agents/azure/ai/agents/operations/_operations.py index 1592a891f2e5..eba194bfb068 100644 --- a/sdk/ai/azure-ai-agents/azure/ai/agents/operations/_operations.py +++ b/sdk/ai/azure-ai-agents/azure/ai/agents/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/ai/azure-ai-agents/samples/agents_response_formats/sample_agents_json_schema_response_format.py b/sdk/ai/azure-ai-agents/samples/agents_response_formats/sample_agents_json_schema_response_format.py index b9a2c645bd30..48e4ab5c7332 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_response_formats/sample_agents_json_schema_response_format.py +++ b/sdk/ai/azure-ai-agents/samples/agents_response_formats/sample_agents_json_schema_response_format.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. diff --git a/sdk/ai/azure-ai-agents/tests/test_ai_instrumentor_base.py b/sdk/ai/azure-ai-agents/tests/test_ai_instrumentor_base.py index 23eadb933dd0..ef5f179b8576 100644 --- a/sdk/ai/azure-ai-agents/tests/test_ai_instrumentor_base.py +++ b/sdk/ai/azure-ai-agents/tests/test_ai_instrumentor_base.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. diff --git a/sdk/ai/azure-ai-agents/tsp-location.yaml b/sdk/ai/azure-ai-agents/tsp-location.yaml index fab6b7f41808..a2b4bb2a31e1 100644 --- a/sdk/ai/azure-ai-agents/tsp-location.yaml +++ b/sdk/ai/azure-ai-agents/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/ai/Azure.AI.Agents -commit: 8d4f7c60f2a1448a1442399aebf1fc17b208a253 +commit: 79479173c15b68431f01eb255a098a6e1de97ddb repo: Azure/azure-rest-api-specs additionalDirectories: