microsoft-agents-hosting-aiohttp 0.9.0.dev2__tar.gz → 0.9.0.dev3__tar.gz

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.
Files changed (26) hide show
  1. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/PKG-INFO +2 -2
  2. microsoft_agents_hosting_aiohttp-0.9.0.dev3/VERSION.txt +1 -0
  3. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/microsoft_agents_hosting_aiohttp.egg-info/PKG-INFO +2 -2
  4. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/microsoft_agents_hosting_aiohttp.egg-info/SOURCES.txt +0 -5
  5. microsoft_agents_hosting_aiohttp-0.9.0.dev3/microsoft_agents_hosting_aiohttp.egg-info/requires.txt +2 -0
  6. microsoft_agents_hosting_aiohttp-0.9.0.dev2/VERSION.txt +0 -1
  7. microsoft_agents_hosting_aiohttp-0.9.0.dev2/microsoft_agents/hosting/aiohttp/app/__init__.py +0 -14
  8. microsoft_agents_hosting_aiohttp-0.9.0.dev2/microsoft_agents/hosting/aiohttp/app/streaming/__init__.py +0 -12
  9. microsoft_agents_hosting_aiohttp-0.9.0.dev2/microsoft_agents/hosting/aiohttp/app/streaming/citation.py +0 -22
  10. microsoft_agents_hosting_aiohttp-0.9.0.dev2/microsoft_agents/hosting/aiohttp/app/streaming/citation_util.py +0 -85
  11. microsoft_agents_hosting_aiohttp-0.9.0.dev2/microsoft_agents/hosting/aiohttp/app/streaming/streaming_response.py +0 -416
  12. microsoft_agents_hosting_aiohttp-0.9.0.dev2/microsoft_agents_hosting_aiohttp.egg-info/requires.txt +0 -2
  13. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/LICENSE +0 -0
  14. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/MANIFEST.in +0 -0
  15. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/microsoft_agents/hosting/aiohttp/__init__.py +0 -0
  16. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/microsoft_agents/hosting/aiohttp/_start_agent_process.py +0 -0
  17. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/microsoft_agents/hosting/aiohttp/agent_http_adapter.py +0 -0
  18. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/microsoft_agents/hosting/aiohttp/channel_service_route_table.py +0 -0
  19. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/microsoft_agents/hosting/aiohttp/cloud_adapter.py +0 -0
  20. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/microsoft_agents/hosting/aiohttp/jwt_authorization_middleware.py +0 -0
  21. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/microsoft_agents_hosting_aiohttp.egg-info/dependency_links.txt +0 -0
  22. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/microsoft_agents_hosting_aiohttp.egg-info/top_level.txt +0 -0
  23. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/pyproject.toml +0 -0
  24. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/readme.md +0 -0
  25. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/setup.cfg +0 -0
  26. {microsoft_agents_hosting_aiohttp-0.9.0.dev2 → microsoft_agents_hosting_aiohttp-0.9.0.dev3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-hosting-aiohttp
3
- Version: 0.9.0.dev2
3
+ Version: 0.9.0.dev3
4
4
  Summary: Integration library for Microsoft Agents with aiohttp
5
5
  Author: Microsoft Corporation
6
6
  License-Expression: MIT
@@ -15,7 +15,7 @@ Classifier: Operating System :: OS Independent
15
15
  Requires-Python: >=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
- Requires-Dist: microsoft-agents-hosting-core==0.9.0.dev2
18
+ Requires-Dist: microsoft-agents-hosting-core==0.9.0.dev3
19
19
  Requires-Dist: aiohttp>=3.11.11
20
20
  Dynamic: license-file
21
21
  Dynamic: requires-dist
@@ -0,0 +1 @@
1
+ 0.9.0.dev3
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-hosting-aiohttp
3
- Version: 0.9.0.dev2
3
+ Version: 0.9.0.dev3
4
4
  Summary: Integration library for Microsoft Agents with aiohttp
5
5
  Author: Microsoft Corporation
6
6
  License-Expression: MIT
@@ -15,7 +15,7 @@ Classifier: Operating System :: OS Independent
15
15
  Requires-Python: >=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
- Requires-Dist: microsoft-agents-hosting-core==0.9.0.dev2
18
+ Requires-Dist: microsoft-agents-hosting-core==0.9.0.dev3
19
19
  Requires-Dist: aiohttp>=3.11.11
20
20
  Dynamic: license-file
21
21
  Dynamic: requires-dist
@@ -10,11 +10,6 @@ microsoft_agents/hosting/aiohttp/agent_http_adapter.py
10
10
  microsoft_agents/hosting/aiohttp/channel_service_route_table.py
11
11
  microsoft_agents/hosting/aiohttp/cloud_adapter.py
12
12
  microsoft_agents/hosting/aiohttp/jwt_authorization_middleware.py
13
- microsoft_agents/hosting/aiohttp/app/__init__.py
14
- microsoft_agents/hosting/aiohttp/app/streaming/__init__.py
15
- microsoft_agents/hosting/aiohttp/app/streaming/citation.py
16
- microsoft_agents/hosting/aiohttp/app/streaming/citation_util.py
17
- microsoft_agents/hosting/aiohttp/app/streaming/streaming_response.py
18
13
  microsoft_agents_hosting_aiohttp.egg-info/PKG-INFO
19
14
  microsoft_agents_hosting_aiohttp.egg-info/SOURCES.txt
20
15
  microsoft_agents_hosting_aiohttp.egg-info/dependency_links.txt
@@ -0,0 +1,2 @@
1
+ microsoft-agents-hosting-core==0.9.0.dev3
2
+ aiohttp>=3.11.11
@@ -1 +0,0 @@
1
- 0.9.0.dev2
@@ -1,14 +0,0 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
- from .streaming import (
5
- Citation,
6
- CitationUtil,
7
- StreamingResponse,
8
- )
9
-
10
- __all__ = [
11
- "Citation",
12
- "CitationUtil",
13
- "StreamingResponse",
14
- ]
@@ -1,12 +0,0 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
- from .citation import Citation
5
- from .citation_util import CitationUtil
6
- from .streaming_response import StreamingResponse
7
-
8
- __all__ = [
9
- "Citation",
10
- "CitationUtil",
11
- "StreamingResponse",
12
- ]
@@ -1,22 +0,0 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
- from typing import Optional
5
- from dataclasses import dataclass
6
-
7
-
8
- @dataclass
9
- class Citation:
10
- """Citations returned by the model."""
11
-
12
- content: str
13
- """The content of the citation."""
14
-
15
- title: Optional[str] = None
16
- """The title of the citation."""
17
-
18
- url: Optional[str] = None
19
- """The URL of the citation."""
20
-
21
- filepath: Optional[str] = None
22
- """The filepath of the document."""
@@ -1,85 +0,0 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
- import re
5
- from typing import List, Optional
6
-
7
- from microsoft_agents.activity import ClientCitation
8
-
9
-
10
- class CitationUtil:
11
- """Utility functions for manipulating text and citations."""
12
-
13
- @staticmethod
14
- def snippet(text: str, max_length: int) -> str:
15
- """
16
- Clips the text to a maximum length in case it exceeds the limit.
17
-
18
- Args:
19
- text: The text to clip.
20
- max_length: The maximum length of the text to return, cutting off the last whole word.
21
-
22
- Returns:
23
- The modified text
24
- """
25
- if len(text) <= max_length:
26
- return text
27
-
28
- snippet = text[:max_length]
29
- snippet = snippet[: min(len(snippet), snippet.rfind(" "))]
30
- snippet += "..."
31
- return snippet
32
-
33
- @staticmethod
34
- def format_citations_response(text: str) -> str:
35
- """
36
- Convert citation tags `[doc(s)n]` to `[n]` where n is a number.
37
-
38
- Args:
39
- text: The text to format.
40
-
41
- Returns:
42
- The formatted text.
43
- """
44
- return re.sub(r"\[docs?(\d+)\]", r"[\1]", text, flags=re.IGNORECASE)
45
-
46
- @staticmethod
47
- def get_used_citations(
48
- text: str, citations: List[ClientCitation]
49
- ) -> Optional[List[ClientCitation]]:
50
- """
51
- Get the citations used in the text. This will remove any citations that are
52
- included in the citations array from the response but not referenced in the text.
53
-
54
- Args:
55
- text: The text to search for citation references, i.e. [1], [2], etc.
56
- citations: The list of citations to search for.
57
-
58
- Returns:
59
- The list of citations used in the text.
60
- """
61
- regex = re.compile(r"\[(\d+)\]", re.IGNORECASE)
62
- matches = regex.findall(text)
63
-
64
- if not matches:
65
- return None
66
-
67
- # Remove duplicates
68
- filtered_matches = set(matches)
69
-
70
- # Add citations
71
- used_citations = []
72
- for match in filtered_matches:
73
- citation_ref = f"[{match}]"
74
- found = next(
75
- (
76
- citation
77
- for citation in citations
78
- if f"[{citation.position}]" == citation_ref
79
- ),
80
- None,
81
- )
82
- if found:
83
- used_citations.append(found)
84
-
85
- return used_citations if used_citations else None
@@ -1,416 +0,0 @@
1
- # Copyright (c) Microsoft Corporation. All rights reserved.
2
- # Licensed under the MIT License.
3
-
4
- import asyncio
5
- import logging
6
- from typing import List, Optional, Callable, Literal
7
-
8
- from microsoft_agents.activity import (
9
- Activity,
10
- Entity,
11
- Attachment,
12
- Channels,
13
- ClientCitation,
14
- DeliveryModes,
15
- SensitivityUsageInfo,
16
- )
17
-
18
- from microsoft_agents.hosting.core import error_resources
19
- from microsoft_agents.hosting.core.turn_context import TurnContext
20
-
21
- from .citation import Citation
22
- from .citation_util import CitationUtil
23
-
24
- logger = logging.getLogger(__name__)
25
-
26
-
27
- class StreamingResponse:
28
- """
29
- A helper class for streaming responses to the client.
30
-
31
- This class is used to send a series of updates to the client in a single response.
32
- The expected sequence of calls is:
33
-
34
- `queue_informative_update()`, `queue_text_chunk()`, `queue_text_chunk()`, ..., `end_stream()`.
35
-
36
- Once `end_stream()` is called, the stream is considered ended and no further updates can be sent.
37
- """
38
-
39
- def __init__(self, context: "TurnContext"):
40
- """
41
- Creates a new StreamingResponse instance.
42
-
43
- Args:
44
- context: Context for the current turn of conversation with the user.
45
- """
46
- self._context = context
47
- self._sequence_number = 1
48
- self._stream_id: Optional[str] = None
49
- self._message = ""
50
- self._attachments: Optional[List[Attachment]] = None
51
- self._ended = False
52
- self._cancelled = False
53
-
54
- # Queue for outgoing activities
55
- self._queue: List[Callable[[], Activity]] = []
56
- self._queue_sync: Optional[asyncio.Task] = None
57
- self._chunk_queued = False
58
-
59
- # Powered by AI feature flags
60
- self._enable_feedback_loop = False
61
- self._feedback_loop_type: Optional[Literal["default", "custom"]] = None
62
- self._enable_generated_by_ai_label = False
63
- self._citations: Optional[List[ClientCitation]] = []
64
- self._sensitivity_label: Optional[SensitivityUsageInfo] = None
65
-
66
- # Channel information
67
- self._is_streaming_channel: bool = False
68
- self._channel_id: Channels = None
69
- self._interval: float = 0.1 # Default interval for sending updates
70
- self._set_defaults(context)
71
-
72
- @property
73
- def stream_id(self) -> Optional[str]:
74
- """
75
- Gets the stream ID of the current response.
76
- Assigned after the initial update is sent.
77
- """
78
- return self._stream_id
79
-
80
- @property
81
- def citations(self) -> Optional[List[ClientCitation]]:
82
- """Gets the citations of the current response."""
83
- return self._citations
84
-
85
- @property
86
- def updates_sent(self) -> int:
87
- """Gets the number of updates sent for the stream."""
88
- return self._sequence_number - 1
89
-
90
- def queue_informative_update(self, text: str) -> None:
91
- """
92
- Queues an informative update to be sent to the client.
93
-
94
- Args:
95
- text: Text of the update to send.
96
- """
97
- if not self._is_streaming_channel:
98
- return
99
-
100
- if self._ended:
101
- raise RuntimeError(str(error_resources.StreamAlreadyEnded))
102
-
103
- # Queue a typing activity
104
- def create_activity():
105
- activity = Activity(
106
- type="typing",
107
- text=text,
108
- entities=[
109
- Entity(
110
- type="streaminfo",
111
- stream_type="informative",
112
- stream_sequence=self._sequence_number,
113
- )
114
- ],
115
- )
116
- self._sequence_number += 1
117
- return activity
118
-
119
- self._queue_activity(create_activity)
120
-
121
- def queue_text_chunk(
122
- self, text: str, citations: Optional[List[Citation]] = None
123
- ) -> None:
124
- """
125
- Queues a chunk of partial message text to be sent to the client.
126
-
127
- The text will be sent as quickly as possible to the client.
128
- Chunks may be combined before delivery to the client.
129
-
130
- Args:
131
- text: Partial text of the message to send.
132
- citations: Citations to be included in the message.
133
- """
134
- if self._cancelled:
135
- return
136
- if self._ended:
137
- raise RuntimeError(str(error_resources.StreamAlreadyEnded))
138
-
139
- # Update full message text
140
- self._message += text
141
-
142
- # If there are citations, modify the content so that the sources are numbers instead of [doc1], [doc2], etc.
143
- self._message = CitationUtil.format_citations_response(self._message)
144
-
145
- # Queue the next chunk
146
- self._queue_next_chunk()
147
-
148
- async def end_stream(self) -> None:
149
- """
150
- Ends the stream by sending the final message to the client.
151
- """
152
- if self._ended:
153
- raise RuntimeError(str(error_resources.StreamAlreadyEnded))
154
-
155
- # Queue final message
156
- self._ended = True
157
- self._queue_next_chunk()
158
-
159
- # Wait for the queue to drain
160
- await self.wait_for_queue()
161
-
162
- def set_attachments(self, attachments: List[Attachment]) -> None:
163
- """
164
- Sets the attachments to attach to the final chunk.
165
-
166
- Args:
167
- attachments: List of attachments.
168
- """
169
- self._attachments = attachments
170
-
171
- def set_sensitivity_label(self, sensitivity_label: SensitivityUsageInfo) -> None:
172
- """
173
- Sets the sensitivity label to attach to the final chunk.
174
-
175
- Args:
176
- sensitivity_label: The sensitivity label.
177
- """
178
- self._sensitivity_label = sensitivity_label
179
-
180
- def set_citations(self, citations: List[Citation]) -> None:
181
- """
182
- Sets the citations for the full message.
183
-
184
- Args:
185
- citations: Citations to be included in the message.
186
- """
187
- if citations:
188
- if not self._citations:
189
- self._citations = []
190
-
191
- curr_pos = len(self._citations)
192
-
193
- for citation in citations:
194
- client_citation = ClientCitation(
195
- type="Claim",
196
- position=curr_pos + 1,
197
- appearance={
198
- "type": "DigitalDocument",
199
- "name": citation.title or f"Document #{curr_pos + 1}",
200
- "abstract": CitationUtil.snippet(citation.content, 477),
201
- },
202
- )
203
- curr_pos += 1
204
- self._citations.append(client_citation)
205
-
206
- def set_feedback_loop(self, enable_feedback_loop: bool) -> None:
207
- """
208
- Sets the Feedback Loop in Teams that allows a user to
209
- give thumbs up or down to a response.
210
- Default is False.
211
-
212
- Args:
213
- enable_feedback_loop: If true, the feedback loop is enabled.
214
- """
215
- self._enable_feedback_loop = enable_feedback_loop
216
-
217
- def set_feedback_loop_type(
218
- self, feedback_loop_type: Literal["default", "custom"]
219
- ) -> None:
220
- """
221
- Sets the type of UI to use for the feedback loop.
222
-
223
- Args:
224
- feedback_loop_type: The type of the feedback loop.
225
- """
226
- self._feedback_loop_type = feedback_loop_type
227
-
228
- def set_generated_by_ai_label(self, enable_generated_by_ai_label: bool) -> None:
229
- """
230
- Sets the Generated by AI label in Teams.
231
- Default is False.
232
-
233
- Args:
234
- enable_generated_by_ai_label: If true, the label is added.
235
- """
236
- self._enable_generated_by_ai_label = enable_generated_by_ai_label
237
-
238
- def get_message(self) -> str:
239
- """
240
- Returns the most recently streamed message.
241
- """
242
- return self._message
243
-
244
- async def wait_for_queue(self) -> None:
245
- """
246
- Waits for the outgoing activity queue to be empty.
247
- """
248
- if self._queue_sync:
249
- await self._queue_sync
250
-
251
- def _set_defaults(self, context: "TurnContext"):
252
- if Channels.ms_teams == context.activity.channel_id.channel:
253
- if context.activity.is_agentic_request():
254
- # Agentic requests do not support streaming responses at this time.
255
- # TODO : Enable streaming for agentic requests when supported.
256
- self._is_streaming_channel = False
257
- else:
258
- self._is_streaming_channel = True
259
- self._interval = 1.0
260
- elif Channels.direct_line == context.activity.channel_id.channel:
261
- self._is_streaming_channel = True
262
- self._interval = 0.5
263
- elif context.activity.delivery_mode == DeliveryModes.stream:
264
- self._is_streaming_channel = True
265
- self._interval = 0.1
266
-
267
- self._channel_id = context.activity.channel_id
268
-
269
- def _queue_next_chunk(self) -> None:
270
- """
271
- Queues the next chunk of text to be sent to the client.
272
- """
273
- # Are we already waiting to send a chunk?
274
- if self._chunk_queued:
275
- return
276
-
277
- # Queue a chunk of text to be sent
278
- self._chunk_queued = True
279
-
280
- def create_activity():
281
- self._chunk_queued = False
282
- if self._ended:
283
- # Send final message
284
- activity = Activity(
285
- type="message",
286
- text=self._message or "end stream response",
287
- attachments=self._attachments or [],
288
- entities=[
289
- Entity(
290
- type="streaminfo",
291
- stream_id=self._stream_id,
292
- stream_type="final",
293
- stream_sequence=self._sequence_number,
294
- )
295
- ],
296
- )
297
- elif self._is_streaming_channel:
298
- # Send typing activity
299
- activity = Activity(
300
- type="typing",
301
- text=self._message,
302
- entities=[
303
- Entity(
304
- type="streaminfo",
305
- stream_type="streaming",
306
- stream_sequence=self._sequence_number,
307
- )
308
- ],
309
- )
310
- else:
311
- return
312
- self._sequence_number += 1
313
- return activity
314
-
315
- self._queue_activity(create_activity)
316
-
317
- def _queue_activity(self, factory: Callable[[], Activity]) -> None:
318
- """
319
- Queues an activity to be sent to the client.
320
- """
321
- self._queue.append(factory)
322
-
323
- # If there's no sync in progress, start one
324
- if not self._queue_sync:
325
- self._queue_sync = asyncio.create_task(self._drain_queue())
326
-
327
- async def _drain_queue(self) -> None:
328
- """
329
- Sends any queued activities to the client until the queue is empty.
330
- """
331
- try:
332
- logger.debug(f"Draining queue with {len(self._queue)} activities.")
333
- while self._queue:
334
- factory = self._queue.pop(0)
335
- activity = factory()
336
- if activity:
337
- await self._send_activity(activity)
338
- except Exception as err:
339
- if (
340
- "403" in str(err)
341
- and self._context.activity.channel_id == Channels.ms_teams
342
- ):
343
- logger.warning("Teams channel stopped the stream.")
344
- self._cancelled = True
345
- else:
346
- logger.error(
347
- f"Error occurred when sending activity while streaming: {err}"
348
- )
349
- raise
350
- finally:
351
- self._queue_sync = None
352
-
353
- async def _send_activity(self, activity: Activity) -> None:
354
- """
355
- Sends an activity to the client and saves the stream ID returned.
356
-
357
- Args:
358
- activity: The activity to send.
359
- """
360
-
361
- streaminfo_entity = None
362
-
363
- if not activity.entities:
364
- streaminfo_entity = Entity(type="streaminfo")
365
- activity.entities = [streaminfo_entity]
366
- else:
367
- for entity in activity.entities:
368
- if hasattr(entity, "type") and entity.type == "streaminfo":
369
- streaminfo_entity = entity
370
- break
371
-
372
- if not streaminfo_entity:
373
- # If no streaminfo entity exists, create one
374
- streaminfo_entity = Entity(type="streaminfo")
375
- activity.entities.append(streaminfo_entity)
376
-
377
- # Set activity ID to the assigned stream ID
378
- if self._stream_id:
379
- activity.id = self._stream_id
380
- streaminfo_entity.stream_id = self._stream_id
381
-
382
- if self._citations and len(self._citations) > 0 and not self._ended:
383
- # Filter out the citations unused in content.
384
- curr_citations = CitationUtil.get_used_citations(
385
- self._message, self._citations
386
- )
387
- if curr_citations:
388
- activity.entities.append(
389
- Entity(
390
- type="https://schema.org/Message",
391
- schema_type="Message",
392
- context="https://schema.org",
393
- id="",
394
- citation=curr_citations,
395
- )
396
- )
397
-
398
- # Add in Powered by AI feature flags
399
- if self._ended:
400
- if self._enable_feedback_loop and self._feedback_loop_type:
401
- # Add feedback loop to streaminfo entity
402
- streaminfo_entity.feedback_loop = {"type": self._feedback_loop_type}
403
- else:
404
- # Add feedback loop enabled to streaminfo entity
405
- streaminfo_entity.feedback_loop_enabled = self._enable_feedback_loop
406
- # Add in Generated by AI
407
- if self._enable_generated_by_ai_label:
408
- activity.add_ai_metadata(self._citations, self._sensitivity_label)
409
-
410
- # Send activity
411
- response = await self._context.send_activity(activity)
412
- await asyncio.sleep(self._interval)
413
-
414
- # Save assigned stream ID
415
- if not self._stream_id and response:
416
- self._stream_id = response.id
@@ -1,2 +0,0 @@
1
- microsoft-agents-hosting-core==0.9.0.dev2
2
- aiohttp>=3.11.11