meshagent-agents 0.0.35__py3-none-any.whl → 0.0.37__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 meshagent-agents might be problematic. Click here for more details.
- meshagent/agents/chat.py +199 -177
- meshagent/agents/version.py +1 -1
- {meshagent_agents-0.0.35.dist-info → meshagent_agents-0.0.37.dist-info}/METADATA +6 -6
- {meshagent_agents-0.0.35.dist-info → meshagent_agents-0.0.37.dist-info}/RECORD +7 -7
- {meshagent_agents-0.0.35.dist-info → meshagent_agents-0.0.37.dist-info}/WHEEL +0 -0
- {meshagent_agents-0.0.35.dist-info → meshagent_agents-0.0.37.dist-info}/licenses/LICENSE +0 -0
- {meshagent_agents-0.0.35.dist-info → meshagent_agents-0.0.37.dist-info}/top_level.txt +0 -0
meshagent/agents/chat.py
CHANGED
|
@@ -223,13 +223,15 @@ class ChatBot(SingleRoomAgent):
|
|
|
223
223
|
)
|
|
224
224
|
)
|
|
225
225
|
|
|
226
|
-
async def _send_and_save_chat(self, messages: Element, path: str, to: RemoteParticipant, id: str, text: str):
|
|
226
|
+
async def _send_and_save_chat(self, messages: Element, path: str, to: RemoteParticipant, id: str, text: str, thread_attributes: dict):
|
|
227
227
|
|
|
228
|
-
with tracer.start_as_current_span("chatbot.
|
|
228
|
+
with tracer.start_as_current_span("chatbot.thread.message") as span:
|
|
229
229
|
|
|
230
|
+
span.set_attributes(thread_attributes)
|
|
231
|
+
span.set_attribute("role", "assistant")
|
|
232
|
+
span.set_attribute("from_participant_name", self.room.local_participant.get_attribute("name"))
|
|
230
233
|
span.set_attributes({
|
|
231
234
|
"id" : id,
|
|
232
|
-
"path" : path,
|
|
233
235
|
"text" : text
|
|
234
236
|
})
|
|
235
237
|
|
|
@@ -243,11 +245,11 @@ class ChatBot(SingleRoomAgent):
|
|
|
243
245
|
})
|
|
244
246
|
|
|
245
247
|
|
|
246
|
-
async def greet(self, *, messages: Element, path: str, chat_context: AgentChatContext, participant: RemoteParticipant):
|
|
248
|
+
async def greet(self, *, messages: Element, path: str, chat_context: AgentChatContext, participant: RemoteParticipant, thread_attributes: dict):
|
|
247
249
|
|
|
248
250
|
if self._auto_greet_message != None:
|
|
249
251
|
chat_context.append_user_message(self._auto_greet_message)
|
|
250
|
-
await self._send_and_save_chat(id=str(uuid.uuid4()), to=RemoteParticipant(id=participant.id), messages=messages, path=path, text= self._auto_greet_message)
|
|
252
|
+
await self._send_and_save_chat(id=str(uuid.uuid4()), to=RemoteParticipant(id=participant.id), messages=messages, path=path, text= self._auto_greet_message, thread_attributes=thread_attributes)
|
|
251
253
|
|
|
252
254
|
|
|
253
255
|
async def get_thread_participants(self, *, thread: MeshDocument):
|
|
@@ -301,11 +303,13 @@ class ChatBot(SingleRoomAgent):
|
|
|
301
303
|
self.room.developer.log_nowait(type="chatbot.thread.started", data={ "path" : path })
|
|
302
304
|
chat_context = await self.init_chat_context()
|
|
303
305
|
opened = False
|
|
304
|
-
|
|
306
|
+
|
|
305
307
|
doc_messages = None
|
|
306
308
|
current_file = None
|
|
307
309
|
llm_messages = Chan[ResponseStreamEvent]()
|
|
308
310
|
thread_context = None
|
|
311
|
+
|
|
312
|
+
thread_attributes = None
|
|
309
313
|
|
|
310
314
|
|
|
311
315
|
def done_processing_llm_events(task: asyncio.Task):
|
|
@@ -325,7 +329,7 @@ class ChatBot(SingleRoomAgent):
|
|
|
325
329
|
async for evt in llm_messages:
|
|
326
330
|
|
|
327
331
|
for participant in self._room.messaging.get_participants():
|
|
328
|
-
logger.
|
|
332
|
+
logger.debug(f"sending event {evt.type} to {participant.get_attribute("name")}")
|
|
329
333
|
|
|
330
334
|
# self.room.messaging.send_message_nowait(to=participant, type="llm.event", message=json.loads(evt.to_json()))
|
|
331
335
|
|
|
@@ -351,180 +355,207 @@ class ChatBot(SingleRoomAgent):
|
|
|
351
355
|
elif evt.type == "response.output_text.done":
|
|
352
356
|
content_element = None
|
|
353
357
|
|
|
358
|
+
with tracer.start_as_current_span("chatbot.thread.message") as span:
|
|
359
|
+
span.set_attribute("from_participant_name", self.room.local_participant.get_attribute("name"))
|
|
360
|
+
span.set_attribute("role", "assistant")
|
|
361
|
+
span.set_attributes(thread_attributes)
|
|
362
|
+
span.set_attributes({
|
|
363
|
+
"text" : evt.text
|
|
364
|
+
})
|
|
354
365
|
|
|
355
366
|
llm_task = asyncio.create_task(process_llm_events())
|
|
356
367
|
llm_task.add_done_callback(done_processing_llm_events)
|
|
357
368
|
|
|
369
|
+
thread = None
|
|
370
|
+
|
|
358
371
|
try:
|
|
359
372
|
|
|
373
|
+
received = None
|
|
374
|
+
|
|
360
375
|
while True:
|
|
361
376
|
|
|
362
377
|
while True:
|
|
363
|
-
|
|
378
|
+
|
|
379
|
+
logger.info(f"waiting for message on thread {path}")
|
|
364
380
|
received = await messages.recv()
|
|
381
|
+
logger.info(f"received message on thread {path}: {received.type}")
|
|
365
382
|
|
|
366
|
-
|
|
383
|
+
chat_with_participant = None
|
|
384
|
+
for participant in self._room.messaging.get_participants():
|
|
385
|
+
if participant.id == received.from_participant_id:
|
|
386
|
+
chat_with_participant = participant
|
|
387
|
+
break
|
|
388
|
+
|
|
389
|
+
if chat_with_participant == None:
|
|
390
|
+
logger.warning("participant does not have messaging enabled, skipping message")
|
|
391
|
+
continue
|
|
392
|
+
|
|
393
|
+
thread_attributes = {
|
|
394
|
+
"agent_name" : self.name,
|
|
395
|
+
"agent_participant_id" : self.room.local_participant.id,
|
|
396
|
+
"agent_participant_name" : self.room.local_participant.get_attribute("name"),
|
|
397
|
+
"remote_participant_id" : chat_with_participant.id,
|
|
398
|
+
"remote_participant_name" : chat_with_participant.get_attribute("name"),
|
|
399
|
+
"path" : path,
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
if current_file != chat_with_participant.get_attribute("current_file"):
|
|
403
|
+
logger.info(f"participant is now looking at {chat_with_participant.get_attribute("current_file")}")
|
|
404
|
+
current_file = chat_with_participant.get_attribute("current_file")
|
|
405
|
+
|
|
406
|
+
if current_file != None:
|
|
407
|
+
chat_context.append_assistant_message(message=f"the user is currently viewing the file at the path: {current_file}")
|
|
367
408
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
"type" : received.type,
|
|
371
|
-
"has_attachment" : received.attachment != None,
|
|
372
|
-
})
|
|
409
|
+
elif current_file != None:
|
|
410
|
+
chat_context.append_assistant_message(message=f"the user is not current viewing any files")
|
|
373
411
|
|
|
374
|
-
|
|
375
|
-
for participant in self._room.messaging.get_participants():
|
|
376
|
-
if participant.id == received.from_participant_id:
|
|
377
|
-
chat_with_participant = participant
|
|
378
|
-
break
|
|
379
|
-
|
|
380
|
-
if chat_with_participant == None:
|
|
381
|
-
logger.warning("participant does not have messaging enabled, skipping message")
|
|
382
|
-
continue
|
|
383
|
-
|
|
384
|
-
if current_file != chat_with_participant.get_attribute("current_file"):
|
|
385
|
-
logger.info(f"participant is now looking at {chat_with_participant.get_attribute("current_file")}")
|
|
386
|
-
current_file = chat_with_participant.get_attribute("current_file")
|
|
387
|
-
|
|
388
|
-
if current_file != None:
|
|
389
|
-
chat_context.append_assistant_message(message=f"the user is currently viewing the file at the path: {current_file}")
|
|
412
|
+
if thread == None:
|
|
390
413
|
|
|
391
|
-
|
|
392
|
-
chat_context.append_assistant_message(message=f"the user is not current viewing any files")
|
|
414
|
+
with tracer.start_as_current_span("chatbot.thread.open") as span:
|
|
393
415
|
|
|
394
|
-
|
|
395
|
-
if thread == None:
|
|
396
|
-
with tracer.start_as_current_span("chatbot.open_thread") as span:
|
|
416
|
+
span.set_attributes(thread_attributes)
|
|
397
417
|
|
|
398
|
-
|
|
418
|
+
thread = await self.open_thread(path=path)
|
|
419
|
+
|
|
420
|
+
for prop in thread.root.get_children():
|
|
399
421
|
|
|
400
|
-
|
|
422
|
+
if prop.tag_name == "messages":
|
|
423
|
+
|
|
424
|
+
doc_messages = prop
|
|
401
425
|
|
|
402
|
-
|
|
426
|
+
for element in doc_messages.get_children():
|
|
427
|
+
|
|
428
|
+
if isinstance(element, Element):
|
|
429
|
+
|
|
430
|
+
msg = element["text"]
|
|
431
|
+
if element["author_name"] == self.room.local_participant.get_attribute("name"):
|
|
432
|
+
chat_context.append_assistant_message(msg)
|
|
433
|
+
else:
|
|
434
|
+
chat_context.append_user_message(msg)
|
|
435
|
+
|
|
436
|
+
for child in element.get_children():
|
|
437
|
+
if child.tag_name == "file":
|
|
438
|
+
chat_context.append_assistant_message(f"the user attached a file with the path '{child.get_attribute("path")}'")
|
|
439
|
+
|
|
440
|
+
if doc_messages == None:
|
|
441
|
+
raise Exception("thread was not properly initialized")
|
|
403
442
|
|
|
404
|
-
doc_messages = prop
|
|
405
|
-
|
|
406
|
-
for element in doc_messages.get_children():
|
|
407
|
-
|
|
408
|
-
if isinstance(element, Element):
|
|
409
|
-
|
|
410
|
-
msg = element["text"]
|
|
411
|
-
if element["author_name"] == self.room.local_participant.get_attribute("name"):
|
|
412
|
-
chat_context.append_assistant_message(msg)
|
|
413
|
-
else:
|
|
414
|
-
chat_context.append_user_message(msg)
|
|
415
|
-
|
|
416
|
-
for child in element.get_children():
|
|
417
|
-
if child.tag_name == "file":
|
|
418
|
-
chat_context.append_assistant_message(f"the user attached a file with the path '{child.get_attribute("path")}'")
|
|
419
|
-
|
|
420
|
-
if doc_messages == None:
|
|
421
|
-
raise Exception("thread was not properly initialized")
|
|
422
443
|
|
|
444
|
+
if received.type == "opened":
|
|
445
|
+
|
|
446
|
+
if opened == False:
|
|
447
|
+
|
|
448
|
+
opened = True
|
|
449
|
+
|
|
450
|
+
await self.greet(path=path, chat_context=chat_context, participant=chat_with_participant, messages=doc_messages, thread_attributes=thread_attributes)
|
|
423
451
|
|
|
424
|
-
|
|
452
|
+
if received.type == "chat":
|
|
425
453
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
opened = True
|
|
429
|
-
|
|
430
|
-
await self.greet(path=path, chat_context=chat_context, participant=chat_with_participant, messages=doc_messages)
|
|
454
|
+
|
|
455
|
+
if thread == None:
|
|
431
456
|
|
|
432
|
-
|
|
457
|
+
self.room.developer.log_nowait(type="thread is not open", data={})
|
|
458
|
+
break
|
|
433
459
|
|
|
434
|
-
with tracer.start_as_current_span("chatbot.handle_chat") as span:
|
|
435
|
-
|
|
436
|
-
text = received.message["text"]
|
|
437
|
-
span.set_attributes({
|
|
438
|
-
"text" : text
|
|
439
|
-
})
|
|
440
|
-
|
|
441
|
-
if thread == None:
|
|
442
460
|
|
|
443
|
-
|
|
444
|
-
|
|
461
|
+
for participant in get_thread_participants(room=self._room, thread=thread):
|
|
462
|
+
# TODO: async gather
|
|
463
|
+
self._room.messaging.send_message_nowait(to=participant, type="thinking", message={"thinking":True, "path": path})
|
|
445
464
|
|
|
465
|
+
if chat_with_participant.id == received.from_participant_id:
|
|
466
|
+
self.room.developer.log_nowait(type="llm.message", data={ "context" : chat_context.id, "participant_id" : self.room.local_participant.id, "participant_name" : self.room.local_participant.get_attribute("name"), "message" : { "content" : { "role" : "user", "text" : received.message["text"] } } })
|
|
446
467
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
self._room.messaging.send_message_nowait(to=participant, type="thinking", message={"thinking":True, "path": path})
|
|
468
|
+
attachments = received.message.get("attachments", [])
|
|
469
|
+
text = received.message["text"]
|
|
450
470
|
|
|
451
|
-
|
|
452
|
-
self.room.developer.log_nowait(type="llm.message", data={ "context" : chat_context.id, "participant_id" : self.room.local_participant.id, "participant_name" : self.room.local_participant.get_attribute("name"), "message" : { "content" : { "role" : "user", "text" : received.message["text"] } } })
|
|
471
|
+
for attachment in attachments:
|
|
453
472
|
|
|
454
|
-
|
|
473
|
+
chat_context.append_assistant_message(message=f"the user attached a file at the path '{attachment["path"]}'")
|
|
455
474
|
|
|
456
|
-
|
|
475
|
+
chat_context.append_user_message(message=text)
|
|
476
|
+
|
|
457
477
|
|
|
458
|
-
|
|
459
|
-
|
|
478
|
+
# if user is typing, wait for typing to stop
|
|
479
|
+
while True:
|
|
480
|
+
|
|
481
|
+
if chat_with_participant.id not in self._is_typing:
|
|
482
|
+
break
|
|
483
|
+
|
|
484
|
+
await asyncio.sleep(.5)
|
|
460
485
|
|
|
461
|
-
|
|
462
|
-
|
|
486
|
+
if messages.empty() == True:
|
|
487
|
+
break
|
|
488
|
+
|
|
489
|
+
if received != None:
|
|
463
490
|
|
|
464
|
-
|
|
465
|
-
while True:
|
|
491
|
+
with tracer.start_as_current_span("chatbot.thread.message") as span:
|
|
466
492
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
await asyncio.sleep(.5)
|
|
493
|
+
span.set_attributes(thread_attributes)
|
|
494
|
+
span.set_attribute("role", "user")
|
|
495
|
+
span.set_attribute("from_participant_name", chat_with_participant.get_attribute("name"))
|
|
471
496
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
497
|
+
attachments = received.message.get("attachments", [])
|
|
498
|
+
span.set_attribute("attachments", attachments)
|
|
475
499
|
|
|
476
|
-
|
|
500
|
+
text = received.message["text"]
|
|
501
|
+
span.set_attributes({
|
|
502
|
+
"text" : text
|
|
503
|
+
})
|
|
477
504
|
|
|
505
|
+
try:
|
|
506
|
+
|
|
507
|
+
if thread_context == None:
|
|
508
|
+
|
|
509
|
+
thread_context = ChatThreadContext(
|
|
510
|
+
chat=chat_context,
|
|
511
|
+
thread=thread,
|
|
512
|
+
participants=get_thread_participants(room=self.room, thread=thread)
|
|
513
|
+
)
|
|
478
514
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
for participant in get_thread_participants(room=self._room, thread=thread):
|
|
506
|
-
# TODO: async gather
|
|
507
|
-
self._room.messaging.send_message_nowait(to=participant, type="thinking", message={"thinking":False, "path" : path})
|
|
515
|
+
def handle_event(evt):
|
|
516
|
+
llm_messages.send_nowait(evt)
|
|
517
|
+
|
|
518
|
+
with tracer.start_as_current_span("chatbot.llm") as span:
|
|
519
|
+
|
|
520
|
+
try:
|
|
521
|
+
|
|
522
|
+
with tracer.start_as_current_span("get_thread_toolkits") as span:
|
|
523
|
+
|
|
524
|
+
thread_toolkits = await self.get_thread_toolkits(thread_context=thread_context, participant=participant)
|
|
525
|
+
|
|
526
|
+
response = await self._llm_adapter.next(
|
|
527
|
+
context=chat_context,
|
|
528
|
+
room=self._room,
|
|
529
|
+
toolkits=thread_toolkits,
|
|
530
|
+
tool_adapter=self._tool_adapter,
|
|
531
|
+
event_handler=handle_event
|
|
532
|
+
)
|
|
533
|
+
except Exception as e:
|
|
534
|
+
logger.error("An error was encountered", exc_info=e)
|
|
535
|
+
await self._send_and_save_chat(messages=doc_messages, to=chat_with_participant, path=path, id=str(uuid.uuid4()), text="There was an error while communicating with the LLM. Please try again later.", thread_attributes=thread_attributes)
|
|
536
|
+
|
|
537
|
+
finally:
|
|
538
|
+
for participant in get_thread_participants(room=self._room, thread=thread):
|
|
539
|
+
# TODO: async gather
|
|
540
|
+
self._room.messaging.send_message_nowait(to=participant, type="thinking", message={"thinking":False, "path" : path})
|
|
508
541
|
|
|
509
|
-
|
|
510
542
|
finally:
|
|
511
|
-
|
|
512
|
-
|
|
543
|
+
|
|
513
544
|
llm_messages.close()
|
|
514
545
|
|
|
515
546
|
if self.room != None:
|
|
547
|
+
logger.info("thread was ended {path}")
|
|
516
548
|
self.room.developer.log_nowait(type="chatbot.thread.ended", data={ "path" : path })
|
|
517
549
|
|
|
518
550
|
if thread != None:
|
|
519
551
|
await self.close_thread(path=path)
|
|
520
|
-
|
|
521
552
|
|
|
522
|
-
def _get_message_channel(self,
|
|
523
|
-
if
|
|
553
|
+
def _get_message_channel(self, key: str) -> Chan[RoomMessage]:
|
|
554
|
+
if key not in self._message_channels:
|
|
524
555
|
chan = Chan[RoomMessage]()
|
|
525
|
-
self._message_channels[
|
|
556
|
+
self._message_channels[key] = chan
|
|
526
557
|
|
|
527
|
-
chan = self._message_channels[
|
|
558
|
+
chan = self._message_channels[key]
|
|
528
559
|
|
|
529
560
|
return chan
|
|
530
561
|
|
|
@@ -540,69 +571,60 @@ class ChatBot(SingleRoomAgent):
|
|
|
540
571
|
|
|
541
572
|
await super().start(room=room)
|
|
542
573
|
|
|
543
|
-
logger.
|
|
574
|
+
logger.debug("Starting chatbot")
|
|
544
575
|
|
|
545
576
|
await self.room.local_participant.set_attribute("empty_state_title", self._empty_state_title)
|
|
546
577
|
|
|
547
578
|
def on_message(message: RoomMessage):
|
|
548
579
|
|
|
549
|
-
logger.info(f"received message {message.type}")
|
|
550
580
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
span.set_attributes({
|
|
554
|
-
"type" : message.type,
|
|
555
|
-
"from_participant_id" : message.from_participant_id
|
|
556
|
-
})
|
|
557
|
-
|
|
558
|
-
messages = self._get_message_channel(participant_id=message.from_participant_id)
|
|
559
|
-
if message.type == "chat" or message.type == "opened":
|
|
560
|
-
path = message.message["path"]
|
|
581
|
+
if message.type == "chat" or message.type == "opened":
|
|
561
582
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
583
|
+
path = message.message["path"]
|
|
584
|
+
|
|
585
|
+
messages = self._get_message_channel(path)
|
|
565
586
|
|
|
566
|
-
|
|
587
|
+
logger.info(f"queued incoming message for thread {path}: {message.type}")
|
|
588
|
+
|
|
589
|
+
messages.send_nowait(message)
|
|
567
590
|
|
|
568
|
-
|
|
591
|
+
if path not in self._thread_tasks or self._thread_tasks[path].done():
|
|
569
592
|
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
def thread_done(task: asyncio.Task):
|
|
573
|
-
|
|
574
|
-
self._message_channels.pop(message.from_participant_id)
|
|
575
|
-
try:
|
|
576
|
-
task.result()
|
|
577
|
-
except CancelledError as e:
|
|
578
|
-
pass
|
|
579
|
-
except Exception as e:
|
|
580
|
-
logger.error(f"The chat thread ended with an error {e}", exc_info=e)
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
task = asyncio.create_task(self._spawn_thread(messages=messages, path=path))
|
|
584
|
-
task.add_done_callback(thread_done)
|
|
593
|
+
def thread_done(task: asyncio.Task):
|
|
585
594
|
|
|
586
|
-
self.
|
|
587
|
-
|
|
588
|
-
elif message.type == "typing":
|
|
589
|
-
def callback(task: asyncio.Task):
|
|
595
|
+
self._message_channels.pop(path)
|
|
590
596
|
try:
|
|
591
597
|
task.result()
|
|
592
|
-
except:
|
|
598
|
+
except CancelledError as e:
|
|
593
599
|
pass
|
|
600
|
+
except Exception as e:
|
|
601
|
+
logger.error(f"The chat thread ended with an error {e}", exc_info=e)
|
|
602
|
+
|
|
594
603
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
604
|
+
logger.info(f"spawning chat thread for {path}")
|
|
605
|
+
task = asyncio.create_task(self._spawn_thread(messages=messages, path=path))
|
|
606
|
+
task.add_done_callback(thread_done)
|
|
607
|
+
|
|
608
|
+
self._thread_tasks[path] = task
|
|
609
|
+
|
|
610
|
+
elif message.type == "typing":
|
|
611
|
+
def callback(task: asyncio.Task):
|
|
612
|
+
try:
|
|
613
|
+
task.result()
|
|
614
|
+
except:
|
|
615
|
+
pass
|
|
616
|
+
|
|
617
|
+
async def remove_timeout(id: str):
|
|
618
|
+
await asyncio.sleep(1)
|
|
619
|
+
self._is_typing.pop(id)
|
|
598
620
|
|
|
599
|
-
|
|
600
|
-
|
|
621
|
+
if message.from_participant_id in self._is_typing:
|
|
622
|
+
self._is_typing[message.from_participant_id].cancel()
|
|
601
623
|
|
|
602
|
-
|
|
603
|
-
|
|
624
|
+
timeout = asyncio.create_task(remove_timeout(id=message.from_participant_id))
|
|
625
|
+
timeout.add_done_callback(callback)
|
|
604
626
|
|
|
605
|
-
|
|
627
|
+
self._is_typing[message.from_participant_id] = timeout
|
|
606
628
|
|
|
607
629
|
room.messaging.on("message", on_message)
|
|
608
630
|
|
|
@@ -616,6 +638,6 @@ class ChatBot(SingleRoomAgent):
|
|
|
616
638
|
room.messaging.on("participant_added", on_participant_added)
|
|
617
639
|
|
|
618
640
|
|
|
619
|
-
logger.
|
|
641
|
+
logger.debug("Enabling chatbot messaging")
|
|
620
642
|
await room.messaging.enable()
|
|
621
643
|
|
meshagent/agents/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
1
|
+
__version__ = "0.0.37"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-agents
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.37
|
|
4
4
|
Summary: Agent Building Blocks for Meshagent
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Documentation, https://docs.meshagent.com
|
|
@@ -12,19 +12,19 @@ License-File: LICENSE
|
|
|
12
12
|
Requires-Dist: pyjwt~=2.10
|
|
13
13
|
Requires-Dist: pytest~=8.3
|
|
14
14
|
Requires-Dist: pytest-asyncio~=0.26
|
|
15
|
-
Requires-Dist: meshagent-api~=0.0.
|
|
16
|
-
Requires-Dist: meshagent-tools~=0.0.
|
|
17
|
-
Requires-Dist: meshagent-openai~=0.0.
|
|
15
|
+
Requires-Dist: meshagent-api~=0.0.37
|
|
16
|
+
Requires-Dist: meshagent-tools~=0.0.37
|
|
17
|
+
Requires-Dist: meshagent-openai~=0.0.37
|
|
18
18
|
Requires-Dist: pydantic~=2.11
|
|
19
19
|
Requires-Dist: opentelemetry-distro~=0.54b1
|
|
20
20
|
Provides-Extra: all
|
|
21
|
-
Requires-Dist: meshagent-api[all]~=0.0.
|
|
21
|
+
Requires-Dist: meshagent-api[all]~=0.0.37; extra == "all"
|
|
22
22
|
Requires-Dist: chonkie~=0.5.1; extra == "all"
|
|
23
23
|
Requires-Dist: chonkie[semantic]~=0.5.1; extra == "all"
|
|
24
24
|
Requires-Dist: chonkie[openai]~=0.5.1; extra == "all"
|
|
25
25
|
Requires-Dist: aiosmtplib~=4.0.1; extra == "all"
|
|
26
26
|
Provides-Extra: sync
|
|
27
|
-
Requires-Dist: meshagent-api[sync]~=0.0.
|
|
27
|
+
Requires-Dist: meshagent-api[sync]~=0.0.37; extra == "sync"
|
|
28
28
|
Provides-Extra: mail
|
|
29
29
|
Requires-Dist: aiosmtplib~=4.0.1; extra == "mail"
|
|
30
30
|
Provides-Extra: rag
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
meshagent/agents/__init__.py,sha256=S83622vDM9hWErcgfwZg8lJT2ncu00OEgnxoIbY3VcM,376
|
|
2
2
|
meshagent/agents/adapter.py,sha256=_83Q2XiA8e6Xh37xYnJ9z75AbDWskR-mmKH-LLq6mpA,1318
|
|
3
3
|
meshagent/agents/agent.py,sha256=b41t1XLG5QYxjlWrkf7EbR7ecVfwcTtXMe8p3N9_32Y,19419
|
|
4
|
-
meshagent/agents/chat.py,sha256=
|
|
4
|
+
meshagent/agents/chat.py,sha256=tNwHYEA-_tLoB2_9DNZ9mXpU1n--l6t_q5Q0XgPKVj0,26059
|
|
5
5
|
meshagent/agents/context.py,sha256=6eFK7wizjzZmZyhbqwazlT_E_e_Cpb17Qa3tBk2BJzw,3804
|
|
6
6
|
meshagent/agents/development.py,sha256=04VYL1Q_BWUTQeVuiVOpyjcs8bzUIX1eQ4VyTtjc5s0,926
|
|
7
7
|
meshagent/agents/hosting.py,sha256=1vzr6aV_HPJGzGPkQdLgt4CqvDAgpHdBEmSym_0r3j8,4982
|
|
@@ -14,7 +14,7 @@ meshagent/agents/pydantic.py,sha256=My9sv1A56unA0qVoPSH-mYtxcgl0AKyxFgyOM70pjLM,
|
|
|
14
14
|
meshagent/agents/single_shot_writer.py,sha256=QsGvTIw1qtp8nGLfzuJwdZj6ucY4cW9rdecqNwv83FA,3355
|
|
15
15
|
meshagent/agents/thread_schema.py,sha256=-KGAMNxQsVuXpvc0avV-OYHe2LMXpjTu5PyQ-1nBnyE,2667
|
|
16
16
|
meshagent/agents/utils.py,sha256=upMbvG4KODZijeTO3IdW4GgzFPz4jXTzNhZBDmtroic,1431
|
|
17
|
-
meshagent/agents/version.py,sha256=
|
|
17
|
+
meshagent/agents/version.py,sha256=JaGEpJ5xP3R4j7pGgCziGajlIRjy1_NJdv_OaXPQius,22
|
|
18
18
|
meshagent/agents/worker.py,sha256=G2Q3UpUCQQ8GtPK5_LW4q8uDOyuJXJM_zdRPsx4puck,3260
|
|
19
19
|
meshagent/agents/writer.py,sha256=2Nk52JcjdRz3EnGBO4EHnv49QzByWiije1LKMNuCAIo,2687
|
|
20
20
|
meshagent/agents/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -23,8 +23,8 @@ meshagent/agents/schemas/gallery.py,sha256=fzAdlDrn_dJz4FDPkSTH9ir7QmRpV8wFjj6RT
|
|
|
23
23
|
meshagent/agents/schemas/presentation.py,sha256=DreBXAU7Lx92NBPTlEOZq1gdaRs0OkZrJgPT5N7fYH4,1265
|
|
24
24
|
meshagent/agents/schemas/schema.py,sha256=O52T5nUGRNQ8AsamZ_W_IQ8WRDqSBo3vWFDSQcC7Lcg,4473
|
|
25
25
|
meshagent/agents/schemas/super_editor_document.py,sha256=lFpbZn_s_6hchimddzpnGneJ7LaB6dTN_AnLZsx2r9c,1469
|
|
26
|
-
meshagent_agents-0.0.
|
|
27
|
-
meshagent_agents-0.0.
|
|
28
|
-
meshagent_agents-0.0.
|
|
29
|
-
meshagent_agents-0.0.
|
|
30
|
-
meshagent_agents-0.0.
|
|
26
|
+
meshagent_agents-0.0.37.dist-info/licenses/LICENSE,sha256=eTt0SPW-sVNdkZe9PS_S8WfCIyLjRXRl7sUBWdlteFg,10254
|
|
27
|
+
meshagent_agents-0.0.37.dist-info/METADATA,sha256=g8JilzX9cTv6vvA_bcAfDLpP3JGyIAE61SJxnxRsplg,1308
|
|
28
|
+
meshagent_agents-0.0.37.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
+
meshagent_agents-0.0.37.dist-info/top_level.txt,sha256=GlcXnHtRP6m7zlG3Df04M35OsHtNXy_DY09oFwWrH74,10
|
|
30
|
+
meshagent_agents-0.0.37.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|