microsoft-agents-activity 0.6.0.dev1__py3-none-any.whl → 0.6.0.dev7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of microsoft-agents-activity might be problematic. Click here for more details.

@@ -0,0 +1,6 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from ._deferred_string import _DeferredString
5
+
6
+ __all__ = ["_DeferredString"]
@@ -0,0 +1,34 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ import logging
5
+ from typing import Callable
6
+
7
+ logger = logging.getLogger(__name__)
8
+
9
+
10
+ class _DeferredString:
11
+ """A wrapper around a function to allow for deferred evaluation.
12
+
13
+ The result of the function is converted to a string with str().
14
+ If an error occurs during evaluation, an error is logged and a default
15
+ string is returned.
16
+ """
17
+
18
+ def __init__(self, func: Callable, *args, **kwargs):
19
+ """Initializes a DeferredString instance.
20
+
21
+ :param func: The function to be called to get the string value.
22
+ :param args: Positional arguments to pass to the function.
23
+ :param kwargs: Keyword arguments to pass to the function.
24
+ """
25
+ self.func = func
26
+ self.args = args
27
+ self.kwargs = kwargs
28
+
29
+ def __str__(self):
30
+ try:
31
+ return str(self.func(*self.args, **self.kwargs))
32
+ except Exception as e:
33
+ logger.error("Error evaluating deferred string", exc_info=e)
34
+ return "_DeferredString: error evaluating deferred string"
@@ -12,7 +12,7 @@ class ChannelAccount(AgentsModel):
12
12
  """Channel account information needed to route a message.
13
13
 
14
14
  :param id: Channel id for the user or agent on this channel (Example:
15
- joe@smith.com, or @joesmith or 123456)
15
+ ``joe@smith.com``, or ``@joesmith`` or ``123456``)
16
16
  :type id: str
17
17
  :param name: Display friendly name
18
18
  :type name: str
@@ -16,7 +16,7 @@ class ConversationAccount(AgentsModel):
16
16
  channels that distinguish between conversation types
17
17
  :type conversation_type: str
18
18
  :param id: Channel id for the user or agent on this channel (Example:
19
- joe@smith.com, or @joesmith or 123456)
19
+ ``joe@smith.com``, or ``@joesmith`` or ``123456``)
20
20
  :type id: str
21
21
  :param name: Display friendly name
22
22
  :type name: str
@@ -9,7 +9,7 @@ from ..agents_model import AgentsModel
9
9
  class TeamsChannelAccount(AgentsModel):
10
10
  """Teams channel account detailing user Azure Active Directory details.
11
11
 
12
- :param id: Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456)
12
+ :param id: Channel id for the user or bot on this channel (Example: ``joe@smith.com``, or ``@joesmith`` or ``123456``)
13
13
  :type id: str
14
14
  :param name: Display friendly name
15
15
  :type name: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-activity
3
- Version: 0.6.0.dev1
3
+ Version: 0.6.0.dev7
4
4
  Summary: A protocol library for Microsoft Agents
5
5
  Author: Microsoft Corporation
6
6
  License-Expression: MIT
@@ -23,12 +23,12 @@ microsoft_agents/activity/basic_card.py,sha256=vJ8NcMCmGyNp_LTo1ErE9xocO_e_zP8BL
23
23
  microsoft_agents/activity/caller_id_constants.py,sha256=OPUjKk3iFb-5oBcFUPpgHMYwvLPaPuz5iJNzX77a4gU,315
24
24
  microsoft_agents/activity/card_action.py,sha256=-c9VLUNVrRx1wYCSiCueZRvWOO5nWOA6xrGh6gHs7i0,1509
25
25
  microsoft_agents/activity/card_image.py,sha256=2DCOErbmGm8dRhJrYhxDweQgH0ys-5_cRISxgJ7hx9k,640
26
- microsoft_agents/activity/channel_account.py,sha256=2M5K1NJl1GTttYNI65OQBvxLcgGzx9B7bJhjdTHRsgo,1217
26
+ microsoft_agents/activity/channel_account.py,sha256=rKCcGW6FC_LYKGvYOGmKrFX1XkJoyshQseoxJr25xGg,1229
27
27
  microsoft_agents/activity/channel_adapter_protocol.py,sha256=CQU9FhsR5UCzRib8DJVj9DO0131QB9Kn5euhHRKGCf4,2135
28
28
  microsoft_agents/activity/channel_id.py,sha256=m59mGBfHQ5g3AdK2p_kMxIm9pC--okgOz3wopTmxFMs,3814
29
29
  microsoft_agents/activity/channels.py,sha256=UC5MDF5C4PbW29rJhtXzfjA-4y4VqPXi1nK8oCmHM0o,4560
30
30
  microsoft_agents/activity/contact_relation_update_action_types.py,sha256=6RIJbnVmr8agTPYYw84xTH9rx88QE0dvMbNwC0cpcG0,208
31
- microsoft_agents/activity/conversation_account.py,sha256=fOU9PgxnH8NsHIZDiESU22Ph3oEE0PMnLbKYuz3vgYA,1536
31
+ microsoft_agents/activity/conversation_account.py,sha256=i8jWqr5aFdHHMm4WqKF_Cowpx2_VZRnf8TMLD0xiEEY,1548
32
32
  microsoft_agents/activity/conversation_members.py,sha256=6-kBKO3W7rtpG1sbhKX5T6FDBDlQDzXdIIpjQALw1K4,552
33
33
  microsoft_agents/activity/conversation_parameters.py,sha256=JwsoZeml90q8W_ngYBao218-q1FIMSAbIf3yUXz3yAg,1475
34
34
  microsoft_agents/activity/conversation_reference.py,sha256=hcWDW8oi18KDX4HCcMfEOcsa9IJgj-_ymXPbg49LGsY,2657
@@ -80,6 +80,8 @@ microsoft_agents/activity/token_status.py,sha256=o3pGTKRjuqEndRWClMe91Cmox6cW8aD
80
80
  microsoft_agents/activity/transcript.py,sha256=vV0p-JEt62UPp3D4gmz1Fn1vq45vpjc01x2p5iCzKsw,423
81
81
  microsoft_agents/activity/turn_context_protocol.py,sha256=S1lJi_pT-o3w0RNB9p4WDiOEL7SHBf_gojRfY9CBwF4,1787
82
82
  microsoft_agents/activity/video_card.py,sha256=6ZYvTYCsIsACbR3KJBhfwFJ1GTYbjKJWvBsqw0pyyWA,2048
83
+ microsoft_agents/activity/_utils/__init__.py,sha256=GM-i-Cw49__7zSb7OMzS5S4KFkKU1uEf5LlINUgipmY,172
84
+ microsoft_agents/activity/_utils/_deferred_string.py,sha256=4FGBIExyfmncr-jxgsARWct9cy-5nnPll2nUD-UYkXw,1124
83
85
  microsoft_agents/activity/entity/__init__.py,sha256=nq9ySwflvNeFWKxZmvb4XenYwB_ATDbeOikkk860UfY,826
84
86
  microsoft_agents/activity/entity/ai_entity.py,sha256=VOjU9Y6m68vkiKUHnqG5XmNPRu4KCSKmd0XPDCJ6B0s,3280
85
87
  microsoft_agents/activity/entity/entity.py,sha256=FmJ23emzoEiV66JjpkOwCQoJReFB_5whihj3PFdRtKk,1105
@@ -186,7 +188,7 @@ microsoft_agents/activity/teams/task_module_task_info.py,sha256=hjqQK2ihIw0lnNDS
186
188
  microsoft_agents/activity/teams/team_details.py,sha256=dEgqvQ_I6PhxvcSQS1zJfRsOLgDeiD0VN4Rz9TqaTx8,816
187
189
  microsoft_agents/activity/teams/team_info.py,sha256=AsYyQwjOBA6C2sx-c54jJ-6ZVPBnimIfhQ7C_DWOV6c,469
188
190
  microsoft_agents/activity/teams/teams_batch_operation_response.py,sha256=pzjiBAEYSCy92sNjNrLRqEyoVHVZ-1PHocPjNwcIiM4,622
189
- microsoft_agents/activity/teams/teams_channel_account.py,sha256=sNxt0AopWu0r2UdF78P8X6Xcy4g6hK7c3ndo2Goe05A,1359
191
+ microsoft_agents/activity/teams/teams_channel_account.py,sha256=4qWy_MFmitJvb3ugqz8pYaH-NeiUXpBEXnkwerKR5_g,1371
190
192
  microsoft_agents/activity/teams/teams_channel_data.py,sha256=HOhdGa8hH6lnJwJRSH6NYScS87Lp9KQXa7sexktsLzc,1700
191
193
  microsoft_agents/activity/teams/teams_channel_data_settings.py,sha256=7T8duAUjfAazAuPaANGRZ_rpzAcYnEEfvzzdqxO1kuU,454
192
194
  microsoft_agents/activity/teams/teams_meeting_info.py,sha256=zpCeeYxTNcxYdWeTjE1yLhiR0dkeO8Ds1uI0wh21mRc,310
@@ -196,8 +198,8 @@ microsoft_agents/activity/teams/teams_member.py,sha256=vRcLRHy6wTfH7DP6k6QbrKkOR
196
198
  microsoft_agents/activity/teams/teams_paged_members_result.py,sha256=cG4eKHjA0u1EMioC2ErVpydnoPJrtTDcdhdzYET9xto,555
197
199
  microsoft_agents/activity/teams/tenant_info.py,sha256=h8OxMd6LD5lWVj_LK2ut8z7SB0I7Gx74W1wwEiYOzXk,296
198
200
  microsoft_agents/activity/teams/user_meeting_details.py,sha256=tvk2CWYf7Bo-DhK8NSojhanJDXEOGVrKXxJDca03CAo,467
199
- microsoft_agents_activity-0.6.0.dev1.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
200
- microsoft_agents_activity-0.6.0.dev1.dist-info/METADATA,sha256=J1pCMdSBZxJGRjM6x8mWVdWrj6haZaPR6YqXJV5D8vU,8718
201
- microsoft_agents_activity-0.6.0.dev1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
202
- microsoft_agents_activity-0.6.0.dev1.dist-info/top_level.txt,sha256=lWKcT4v6fTA_NgsuHdNvuMjSrkiBMXohn64ApY7Xi8A,17
203
- microsoft_agents_activity-0.6.0.dev1.dist-info/RECORD,,
201
+ microsoft_agents_activity-0.6.0.dev7.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
202
+ microsoft_agents_activity-0.6.0.dev7.dist-info/METADATA,sha256=K_l1dY2WZjikOoh9zZTJBXXY5uUs_xqiUy2Fd71bUSM,8718
203
+ microsoft_agents_activity-0.6.0.dev7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
204
+ microsoft_agents_activity-0.6.0.dev7.dist-info/top_level.txt,sha256=lWKcT4v6fTA_NgsuHdNvuMjSrkiBMXohn64ApY7Xi8A,17
205
+ microsoft_agents_activity-0.6.0.dev7.dist-info/RECORD,,