Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta6 release of azure-ai-projects SDK #39362

Merged
merged 28 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fddb7eb
Fixed dead links in pypi and makie it more searchable (#38983)
howieleung Jan 18, 2025
5e7b5d7
multiagent updates (#39349)
M-Hietala Jan 22, 2025
aa3e318
Comply with the new API version (#39328)
nick863 Jan 22, 2025
a857adc
Set default Application-ID in "user-agent" HTTP request header, for a…
dargilco Jan 23, 2025
de53e9e
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Jan 23, 2025
329cf82
update sample with correct year format (#39366)
sophia-ramsey Jan 23, 2025
06d23a0
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Jan 25, 2025
4f74e54
Update to version beta 6
dargilco Jan 25, 2025
f2546e9
Create sample for agents with logic apps (#39371)
sophia-ramsey Jan 27, 2025
3f89e7d
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Jan 30, 2025
0dbe0ee
adding a sample how to add custom attributes to traces (#39445)
M-Hietala Jan 30, 2025
cd61ea1
update logic app sample to fetch workflow url (#39477)
sophia-ramsey Jan 30, 2025
bd37d40
Fixes to vectorstore/file patches (#39514)
jhakulin Feb 1, 2025
c23289c
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Feb 1, 2025
dc97373
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Feb 3, 2025
67d1502
Add "None" as possible authentication type for connections. (#39517)
dargilco Feb 3, 2025
3eb0eb3
Jhakulin/b6 updates (#39548)
jhakulin Feb 5, 2025
ce06424
[AI] [Agents] Add sharepoint tool sample (#39487)
glharper Feb 6, 2025
e281d52
Add the readme section on how to deploy function and record tests. (#…
nick863 Feb 7, 2025
24d2b6b
M hietala/adding function tracing conveniency (#39368)
M-Hietala Feb 10, 2025
6545950
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Feb 14, 2025
0458492
updating tracing section in readme (#39745)
M-Hietala Feb 14, 2025
2f2d174
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Feb 14, 2025
d639eb6
azure ai search sample update (#39692)
jhakulin Feb 14, 2025
11e58e3
Update quotes in changelog.md
dargilco Feb 15, 2025
4ca1580
Update code snippets in README.md. Run 'black' tool
dargilco Feb 15, 2025
504bddd
Remove breaking change section with no content in CHANGELOG.md
dargilco Feb 15, 2025
d9ed161
Minor updates to text in CHANGELOG.md
dargilco Feb 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions sdk/ai/azure-ai-projects/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Release History

## 1.0.0b6 (2025-02-14)

### Features added

* Added `trace_function` decorator for conveniently tracing function calls in Agents using OpenTelemetry. Please see the README.md for updated documentation.

### Sample updates

* Added AzureLogicAppTool utility and Logic App sample under `samples/agents`, folder to make Azure Logic App integration with Agents easier.
* Added better observability for Azure AI Search sample for Agents via improved run steps information from the service.
* Added sample to demonstrate how to add custom attributes to telemetry span.

### Bugs Fixed

* Lowered the logging level of "Toolset is not available in the client" from `warning` to `debug` to prevent unnecessary log entries in agent application runs.

## 1.0.0b5 (2025-01-17)

### Features added
Expand Down
213 changes: 192 additions & 21 deletions sdk/ai/azure-ai-projects/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/ai/azure-ai-projects/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/ai/azure-ai-projects",
"Tag": "python/ai/azure-ai-projects_40731b58e1"
"Tag": "python/ai/azure-ai-projects_85b26dc606"
}
60 changes: 60 additions & 0 deletions sdk/ai/azure-ai-projects/azure/ai/projects/_model_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,34 @@ def __ne__(self, other: typing.Any) -> bool:
return not self.__eq__(other)

def keys(self) -> typing.KeysView[str]:
"""
:returns: a set-like object providing a view on D's keys
:rtype: ~typing.KeysView
"""
return self._data.keys()

def values(self) -> typing.ValuesView[typing.Any]:
"""
:returns: an object providing a view on D's values
:rtype: ~typing.ValuesView
"""
return self._data.values()

def items(self) -> typing.ItemsView[str, typing.Any]:
"""
:returns: set-like object providing a view on D's items
:rtype: ~typing.ItemsView
"""
return self._data.items()

def get(self, key: str, default: typing.Any = None) -> typing.Any:
"""
Get the value for key if key is in the dictionary, else default.
:param str key: The key to look up.
:param any default: The value to return if key is not in the dictionary. Defaults to None
:returns: D[k] if k in D, else d.
:rtype: any
"""
try:
return self[key]
except KeyError:
Expand All @@ -397,17 +416,38 @@ def pop(self, key: str, default: _T) -> _T: ...
def pop(self, key: str, default: typing.Any) -> typing.Any: ...

def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
"""
Removes specified key and return the corresponding value.
:param str key: The key to pop.
:param any default: The value to return if key is not in the dictionary
:returns: The value corresponding to the key.
:rtype: any
:raises KeyError: If key is not found and default is not given.
"""
if default is _UNSET:
return self._data.pop(key)
return self._data.pop(key, default)

def popitem(self) -> typing.Tuple[str, typing.Any]:
"""
Removes and returns some (key, value) pair
:returns: The (key, value) pair.
:rtype: tuple
:raises KeyError: if D is empty.
"""
return self._data.popitem()

def clear(self) -> None:
"""
Remove all items from D.
"""
self._data.clear()

def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
"""
Updates D from mapping/iterable E and F.
:param any args: Either a mapping object or an iterable of key-value pairs.
"""
self._data.update(*args, **kwargs)

@typing.overload
Expand All @@ -417,6 +457,13 @@ def setdefault(self, key: str, default: None = None) -> None: ...
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ...

def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
"""
Same as calling D.get(k, d), and setting D[k]=d if k not found
:param str key: The key to look up.
:param any default: The value to set if key is not in the dictionary
:returns: D[k] if k in D, else d.
:rtype: any
"""
if default is _UNSET:
return self._data.setdefault(key)
return self._data.setdefault(key, default)
Expand Down Expand Up @@ -910,6 +957,19 @@ def _failsafe_deserialize(
return None


def _failsafe_deserialize_xml(
deserializer: typing.Any,
value: typing.Any,
) -> typing.Any:
try:
return _deserialize_xml(deserializer, value)
except DeserializationError:
_LOGGER.warning(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
return None


class _RestField:
def __init__(
self,
Expand Down
4 changes: 3 additions & 1 deletion sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import uuid
from os import PathLike
from pathlib import Path
from typing import Any, Dict, List, Tuple, Union
from typing import Any, Dict, List, Tuple, Union, Optional
from typing_extensions import Self

from azure.core import PipelineClient
Expand Down Expand Up @@ -56,6 +56,8 @@ def __init__( # pylint: disable=super-init-not-called,too-many-statements
kwargs2 = kwargs.copy()
kwargs3 = kwargs.copy()

self._user_agent: Optional[str] = kwargs.get("user_agent", None)

# For getting AppInsights connection string from the AppInsights resource.
# The AppInsights resource URL is not known at this point. We need to get it from the
# AzureML "Workspace - Get" REST API call. It will have the form:
Expand Down
Loading