Skip to content

Commit d04670e

Browse files
committed
Update SDK code ai_vi_0
1 parent 816fb1e commit d04670e

File tree

369 files changed

+51274
-1672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

369 files changed

+51274
-1672
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from ._configuration import AgentsClientConfiguration
1818
from ._utils.serialization import Deserializer, Serializer
1919
from .operations import (
20-
AgentsClientOperationsMixin,
2120
FilesOperations,
2221
MessagesOperations,
2322
RunStepsOperations,
@@ -27,12 +26,13 @@
2726
VectorStoreFilesOperations,
2827
VectorStoresOperations,
2928
)
29+
from .operations._operations import _AgentsClientOperationsMixin
3030

3131
if TYPE_CHECKING:
3232
from azure.core.credentials import TokenCredential
3333

3434

35-
class AgentsClient(AgentsClientOperationsMixin): # pylint: disable=too-many-instance-attributes
35+
class AgentsClient(_AgentsClientOperationsMixin): # pylint: disable=too-many-instance-attributes
3636
"""AgentsClient.
3737
3838
:ivar threads: ThreadsOperations operations

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# pylint: disable=line-too-long,useless-suppression
21
# coding=utf-8
32
# --------------------------------------------------------------------------
43
# Copyright (c) Microsoft Corporation. All rights reserved.

sdk/ai/azure-ai-agents/azure/ai/agents/_utils/model_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# pylint: disable=line-too-long,useless-suppression,too-many-lines
1+
# pylint: disable=too-many-lines
22
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from .._utils.serialization import Deserializer, Serializer
1818
from ._configuration import AgentsClientConfiguration
1919
from .operations import (
20-
AgentsClientOperationsMixin,
2120
FilesOperations,
2221
MessagesOperations,
2322
RunStepsOperations,
@@ -27,12 +26,13 @@
2726
VectorStoreFilesOperations,
2827
VectorStoresOperations,
2928
)
29+
from .operations._operations import _AgentsClientOperationsMixin
3030

3131
if TYPE_CHECKING:
3232
from azure.core.credentials_async import AsyncTokenCredential
3333

3434

35-
class AgentsClient(AgentsClientOperationsMixin): # pylint: disable=too-many-instance-attributes
35+
class AgentsClient(_AgentsClientOperationsMixin): # pylint: disable=too-many-instance-attributes
3636
"""AgentsClient.
3737
3838
:ivar threads: ThreadsOperations operations

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from ._operations import VectorStoresOperations # type: ignore
2121
from ._operations import VectorStoreFilesOperations # type: ignore
2222
from ._operations import VectorStoreFileBatchesOperations # type: ignore
23-
from ._operations import AgentsClientOperationsMixin # type: ignore
2423

2524
from ._patch import __all__ as _patch_all
2625
from ._patch import *
@@ -35,7 +34,6 @@
3534
"VectorStoresOperations",
3635
"VectorStoreFilesOperations",
3736
"VectorStoreFileBatchesOperations",
38-
"AgentsClientOperationsMixin",
3937
]
4038
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
4139
_patch_sdk()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3975,7 +3975,7 @@ async def get_next(_continuation_token=None):
39753975
return AsyncItemPaged(get_next, extract_data)
39763976

39773977

3978-
class AgentsClientOperationsMixin(
3978+
class _AgentsClientOperationsMixin(
39793979
ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], AgentsClientConfiguration]
39803980
):
39813981

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from ._operations import VectorStoresOperations # type: ignore
2121
from ._operations import VectorStoreFilesOperations # type: ignore
2222
from ._operations import VectorStoreFileBatchesOperations # type: ignore
23-
from ._operations import AgentsClientOperationsMixin # type: ignore
2423

2524
from ._patch import __all__ as _patch_all
2625
from ._patch import *
@@ -35,7 +34,6 @@
3534
"VectorStoresOperations",
3635
"VectorStoreFilesOperations",
3736
"VectorStoreFileBatchesOperations",
38-
"AgentsClientOperationsMixin",
3937
]
4038
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
4139
_patch_sdk()

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# pylint: disable=line-too-long,useless-suppression,too-many-lines
1+
# pylint: disable=too-many-lines
22
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5087,7 +5087,9 @@ def get_next(_continuation_token=None):
50875087
return ItemPaged(get_next, extract_data)
50885088

50895089

5090-
class AgentsClientOperationsMixin(ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], AgentsClientConfiguration]):
5090+
class _AgentsClientOperationsMixin(
5091+
ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], AgentsClientConfiguration]
5092+
):
50915093

50925094
@overload
50935095
def create_agent(

sdk/ai/azure-ai-agents/samples/agents_async/sample_agents_deep_research_async.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ async def fetch_and_print_new_agent_response(
6464
return response.id
6565

6666

67-
def create_research_summary(
68-
message : ThreadMessage,
69-
filepath: str = "research_summary.md"
70-
) -> None:
67+
def create_research_summary(message: ThreadMessage, filepath: str = "research_summary.md") -> None:
7168
if not message:
7269
print("No message content provided, cannot create research summary.")
7370
return
@@ -167,4 +164,4 @@ async def main() -> None:
167164

168165

169166
if __name__ == "__main__":
170-
asyncio.run(main())
167+
asyncio.run(main())

sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_deep_research.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ def fetch_and_print_new_agent_response(
6060
return response.id
6161

6262

63-
def create_research_summary(
64-
message : ThreadMessage,
65-
filepath: str = "research_summary.md"
66-
) -> None:
63+
def create_research_summary(message: ThreadMessage, filepath: str = "research_summary.md") -> None:
6764
if not message:
6865
print("No message content provided, cannot create research summary.")
6966
return
@@ -154,9 +151,7 @@ def create_research_summary(
154151
print(f"Run failed: {run.last_error}")
155152

156153
# Fetch the final message from the agent in the thread and create a research summary
157-
final_message = agents_client.messages.get_last_message_by_role(
158-
thread_id=thread.id, role=MessageRole.AGENT
159-
)
154+
final_message = agents_client.messages.get_last_message_by_role(thread_id=thread.id, role=MessageRole.AGENT)
160155
if final_message:
161156
create_research_summary(final_message)
162157

0 commit comments

Comments
 (0)