Skip to content

Commit 48a2e5b

Browse files
committed
Merge branch 'feature/azure-ai-agents/1.0.3' of https://github.com/Azure/azure-sdk-for-python into feature/azure-ai-agents/1.0.3
2 parents aa4d980 + f2f9b26 commit 48a2e5b

File tree

7 files changed

+247
-202
lines changed

7 files changed

+247
-202
lines changed

sdk/ai/azure-ai-agents/CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44

55
### Features Added
66

7-
- Added samples, [`sample_agents_auto_function_call.py`](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_auto_function_call.py) and [`sample_agents_auto_function_call_async.py`](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_auto_function_call_async.py).
7+
### Bugs Fixed
8+
- `AgentsResponseFormatOption`, `MessageInputContent`, `MessageAttachmentToolDefinition`, `AgentsToolChoiceOption` are now public.
9+
10+
### Sample updates
11+
12+
- Added a sample showing auto function call for a synchronous client, [`sample_agents_auto_function_call.py`](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_auto_function_call.py)
13+
- Added a sample showing auto function call for an asynchronous client, [`sample_agents_auto_function_call_async.py`](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_auto_function_call_async.py).
814

915
## 1.0.2 (2025-07-01)
1016

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

Lines changed: 83 additions & 83 deletions
Large diffs are not rendered by default.

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

Lines changed: 83 additions & 85 deletions
Large diffs are not rendered by default.

sdk/ai/azure-ai-agents/azure/ai/agents/aio/operations/_patch.py

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
if TYPE_CHECKING:
5151
# pylint: disable=unused-import,ungrouped-imports
52-
from ... import _types
52+
from ... import types as _types
5353

5454
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
5555
_Unset: Any = object()
@@ -193,8 +193,10 @@ async def create( # pylint: disable=arguments-differ
193193
:keyword response_format: Specifies the format that the model must output. Is one of the
194194
following types: str, Union[str, "_models.AgentsApiResponseFormatMode"],
195195
AgentsApiResponseFormat Default value is None.
196-
:paramtype response_format: str or str or ~azure.ai.agents.models.AgentsApiResponseFormatMode
197-
or ~azure.ai.agents.models.AgentsApiResponseFormat
196+
:paramtype response_format: Optional[Union[str,
197+
~azure.ai.agents.models.AgentsApiResponseFormatMode,
198+
~azure.ai.agents.models.AgentsApiResponseFormat,
199+
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
198200
:keyword parallel_tool_calls: If ``true`` functions will run in parallel during tool use.
199201
Default value is None.
200202
:paramtype parallel_tool_calls: bool
@@ -356,8 +358,10 @@ async def create(
356358
:keyword response_format: Specifies the format that the model must output. Is one of the
357359
following types: str, Union[str, "_models.AgentsApiResponseFormatMode"],
358360
AgentsApiResponseFormat Default value is None.
359-
:paramtype response_format: str or str or ~azure.ai.agents.models.AgentsApiResponseFormatMode
360-
or ~azure.ai.agents.models.AgentsApiResponseFormat
361+
:paramtype response_format: Optional[Union[str,
362+
~azure.ai.agents.models.AgentsApiResponseFormatMode,
363+
~azure.ai.agents.models.AgentsApiResponseFormat,
364+
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
361365
:keyword parallel_tool_calls: If ``true`` functions will run in parallel during tool use.
362366
Default value is None.
363367
:paramtype parallel_tool_calls: bool
@@ -497,9 +501,10 @@ async def create_and_process(
497501
:keyword response_format: Specifies the format that the model must output. Is one of the
498502
following types: str, Union[str, "_models.AgentsApiResponseFormatMode"],
499503
AgentsApiResponseFormat Default value is None.
500-
:paramtype response_format: str or str or
501-
~azure.ai.agents.models.AgentsApiResponseFormatMode or
502-
~azure.ai.agents.models.AgentsApiResponseFormat
504+
:paramtype response_format: Optional[Union[str,
505+
~azure.ai.agents.models.AgentsApiResponseFormatMode,
506+
~azure.ai.agents.models.AgentsApiResponseFormat,
507+
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
503508
:keyword parallel_tool_calls: If ``true`` functions will run in parallel during tool use.
504509
Default value is None.
505510
:paramtype parallel_tool_calls: bool
@@ -673,8 +678,10 @@ async def stream(
673678
:keyword response_format: Specifies the format that the model must output. Is one of the
674679
following types: str, Union[str, "_models.AgentsApiResponseFormatMode"],
675680
AgentsApiResponseFormat Default value is None.
676-
:paramtype response_format: str or str or ~azure.ai.agents.models.AgentsApiResponseFormatMode
677-
or ~azure.ai.agents.models.AgentsApiResponseFormat
681+
:paramtype response_format: Optional[Union[str,
682+
~azure.ai.agents.models.AgentsApiResponseFormatMode,
683+
~azure.ai.agents.models.AgentsApiResponseFormat,
684+
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
678685
:keyword parallel_tool_calls: If ``true`` functions will run in parallel during tool use.
679686
Default value is None.
680687
:paramtype parallel_tool_calls: bool
@@ -782,8 +789,10 @@ async def stream(
782789
:keyword response_format: Specifies the format that the model must output. Is one of the
783790
following types: str, Union[str, "_models.AgentsApiResponseFormatMode"],
784791
AgentsApiResponseFormat Default value is None.
785-
:paramtype response_format: str or str or ~azure.ai.agents.models.AgentsApiResponseFormatMode
786-
or ~azure.ai.agents.models.AgentsApiResponseFormat
792+
:paramtype response_format: Optional[Union[str,
793+
~azure.ai.agents.models.AgentsApiResponseFormatMode,
794+
~azure.ai.agents.models.AgentsApiResponseFormat,
795+
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
787796
:keyword parallel_tool_calls: If ``true`` functions will run in parallel during tool use.
788797
Default value is None.
789798
:paramtype parallel_tool_calls: bool
@@ -961,8 +970,10 @@ async def stream( # pyright: ignore[reportInconsistentOverload]
961970
:keyword response_format: Specifies the format that the model must output. Is one of the
962971
following types: str, Union[str, "_models.AgentsApiResponseFormatMode"],
963972
AgentsApiResponseFormat Default value is None.
964-
:paramtype response_format: str or str or ~azure.ai.agents.models.AgentsApiResponseFormatMode
965-
or ~azure.ai.agents.models.AgentsApiResponseFormat
973+
:paramtype response_format: Optional[Union[str,
974+
~azure.ai.agents.models.AgentsApiResponseFormatMode,
975+
~azure.ai.agents.models.AgentsApiResponseFormat,
976+
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
966977
:keyword parallel_tool_calls: If ``true`` functions will run in parallel during tool use.
967978
Default value is None.
968979
:paramtype parallel_tool_calls: bool
@@ -1305,7 +1316,7 @@ async def upload( # pylint: disable=arguments-differ
13051316
"""Uploads a file for use by other operations.
13061317
13071318
:keyword file_path: The path to the file to upload.
1308-
:type file_path: str
1319+
:paramtype file_path: str
13091320
:keyword purpose: The intended purpose of the uploaded file. Known values are: "assistants", "assistants_output", and "vision".
13101321
:paramtype purpose: str or ~azure.ai.agents.models.FilePurpose
13111322
:return: FileInfo. The FileInfo is compatible with MutableMapping
@@ -1466,7 +1477,7 @@ async def upload_and_poll(
14661477
"""Uploads a file for use by other operations.
14671478
14681479
:keyword file_path: The path to the file to upload.
1469-
:type file_path: str
1480+
:paramtype file_path: str
14701481
:keyword purpose: Known values are: "assistants", "assistants_output", and "vision".
14711482
:paramtype purpose: str or ~azure.ai.agents.models.FilePurpose
14721483
:keyword polling_interval: Time to wait before polling for the status of the uploaded file. Default value

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
from ._models import ThreadMessage as ThreadMessageGenerated
8080
from ._models import MessageAttachment as MessageAttachmentGenerated
8181

82-
from .. import _types
82+
from .. import types as _types
8383

8484

8585
logger = logging.getLogger(__name__)

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

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
if TYPE_CHECKING:
5050
# pylint: disable=unused-import,ungrouped-imports
51-
from .. import _types
51+
from .. import types as _types
5252

5353
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
5454
_Unset: Any = object()
@@ -192,8 +192,10 @@ def create( # pylint: disable=arguments-differ
192192
:keyword response_format: Specifies the format that the model must output. Is one of the
193193
following types: str, Union[str, "_models.AgentsApiResponseFormatMode"],
194194
AgentsApiResponseFormat Default value is None.
195-
:paramtype response_format: str or str or ~azure.ai.agents.models.AgentsApiResponseFormatMode
196-
or ~azure.ai.agents.models.AgentsApiResponseFormat
195+
:paramtype response_format: Optional[Union[str,
196+
~azure.ai.agents.models.AgentsApiResponseFormatMode,
197+
~azure.ai.agents.models.AgentsApiResponseFormat,
198+
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
197199
:keyword parallel_tool_calls: If ``true`` functions will run in parallel during tool use.
198200
Default value is None.
199201
:paramtype parallel_tool_calls: bool
@@ -355,8 +357,10 @@ def create(
355357
:keyword response_format: Specifies the format that the model must output. Is one of the
356358
following types: str, Union[str, "_models.AgentsApiResponseFormatMode"],
357359
AgentsApiResponseFormat Default value is None.
358-
:paramtype response_format: str or str or ~azure.ai.agents.models.AgentsApiResponseFormatMode
359-
or ~azure.ai.agents.models.AgentsApiResponseFormat
360+
:paramtype response_format: Optional[Union[str,
361+
~azure.ai.agents.models.AgentsApiResponseFormatMode,
362+
~azure.ai.agents.models.AgentsApiResponseFormat,
363+
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
360364
:keyword parallel_tool_calls: If ``true`` functions will run in parallel during tool use.
361365
Default value is None.
362366
:paramtype parallel_tool_calls: bool
@@ -496,9 +500,10 @@ def create_and_process(
496500
:keyword response_format: Specifies the format that the model must output. Is one of the
497501
following types: str, Union[str, "_models.AgentsApiResponseFormatMode"],
498502
AgentsApiResponseFormat Default value is None.
499-
:paramtype response_format: str or str or
500-
~azure.ai.agents.models.AgentsApiResponseFormatMode or
501-
~azure.ai.agents.models.AgentsApiResponseFormat
503+
:paramtype response_format: Optional[Union[str,
504+
~azure.ai.agents.models.AgentsApiResponseFormatMode,
505+
~azure.ai.agents.models.AgentsApiResponseFormat,
506+
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
502507
:keyword parallel_tool_calls: If ``true`` functions will run in parallel during tool use.
503508
Default value is None.
504509
:paramtype parallel_tool_calls: bool
@@ -672,8 +677,10 @@ def stream(
672677
:keyword response_format: Specifies the format that the model must output. Is one of the
673678
following types: str, Union[str, "_models.AgentsApiResponseFormatMode"],
674679
AgentsApiResponseFormat Default value is None.
675-
:paramtype response_format: str or str or ~azure.ai.agents.models.AgentsApiResponseFormatMode
676-
or ~azure.ai.agents.models.AgentsApiResponseFormat
680+
:paramtype response_format: Optional[Union[str,
681+
~azure.ai.agents.models.AgentsApiResponseFormatMode,
682+
~azure.ai.agents.models.AgentsApiResponseFormat,
683+
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
677684
:keyword parallel_tool_calls: If ``true`` functions will run in parallel during tool use.
678685
Default value is None.
679686
:paramtype parallel_tool_calls: bool
@@ -781,8 +788,10 @@ def stream(
781788
:keyword response_format: Specifies the format that the model must output. Is one of the
782789
following types: str, Union[str, "_models.AgentsApiResponseFormatMode"],
783790
AgentsApiResponseFormat Default value is None.
784-
:paramtype response_format: str or str or ~azure.ai.agents.models.AgentsApiResponseFormatMode
785-
or ~azure.ai.agents.models.AgentsApiResponseFormat
791+
:paramtype response_format: Optional[Union[str,
792+
~azure.ai.agents.models.AgentsApiResponseFormatMode,
793+
~azure.ai.agents.models.AgentsApiResponseFormat,
794+
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
786795
:keyword parallel_tool_calls: If ``true`` functions will run in parallel during tool use.
787796
Default value is None.
788797
:paramtype parallel_tool_calls: bool
@@ -961,8 +970,10 @@ def stream( # pyright: ignore[reportInconsistentOverload]
961970
:keyword response_format: Specifies the format that the model must output. Is one of the
962971
following types: str, Union[str, "_models.AgentsApiResponseFormatMode"],
963972
AgentsApiResponseFormat Default value is None.
964-
:paramtype response_format: str or str or ~azure.ai.agents.models.AgentsApiResponseFormatMode
965-
or ~azure.ai.agents.models.AgentsApiResponseFormat
973+
:paramtype response_format: Optional[Union[str,
974+
~azure.ai.agents.models.AgentsApiResponseFormatMode,
975+
~azure.ai.agents.models.AgentsApiResponseFormat,
976+
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
966977
:keyword parallel_tool_calls: If ``true`` functions will run in parallel during tool use.
967978
Default value is None.
968979
:paramtype parallel_tool_calls: bool
@@ -1315,7 +1326,7 @@ def upload( # pylint: disable=arguments-differ
13151326
"""Uploads a file for use by other operations.
13161327
13171328
:keyword file_path: The path to the file to upload.
1318-
:type file_path: str
1329+
:paramtype file_path: str
13191330
:keyword purpose: Known values are: "assistants", "assistants_output", and "vision".
13201331
:paramtype purpose: str or ~azure.ai.agents.models.FilePurpose
13211332
:return: FileInfo. The FileInfo is compatible with MutableMapping
@@ -1476,7 +1487,7 @@ def upload_and_poll(
14761487
"""Uploads a file for use by other operations.
14771488
14781489
:keyword file_path: The path to the file on the local filesystem to upload.
1479-
:type file_path: str
1490+
:paramtype file_path: str
14801491
:keyword purpose: Known values are: "assistants", "assistants_output", and "vision".
14811492
:paramtype purpose: str or ~azure.ai.agents.models.FilePurpose
14821493
:keyword polling_interval: Time to wait before polling for the status of the uploaded file. Default value
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# pylint: disable=line-too-long,useless-suppression,too-many-lines
2+
# ------------------------------------
3+
# Copyright (c) Microsoft Corporation.
4+
# Licensed under the MIT License.
5+
# ------------------------------------
6+
7+
from azure.ai.agents._types import (
8+
AgentsResponseFormatOption,
9+
MessageInputContent,
10+
MessageAttachmentToolDefinition,
11+
AgentsToolChoiceOption,
12+
)
13+
14+
__all__ = [
15+
"AgentsResponseFormatOption",
16+
"MessageInputContent",
17+
"MessageAttachmentToolDefinition",
18+
"AgentsToolChoiceOption",
19+
]

0 commit comments

Comments
 (0)