@@ -19,7 +19,7 @@ def __init__(self):
1919 self ._actor_mhqa = MHQAActor .__name__
2020 self ._factory = ActorProxyFactory (retry_policy = RetryPolicy (max_attempts = 1 ))
2121
22- async def do_mhqa_response (self , data : MHQAInput ):
22+ async def do_mhqa_respond (self , data : MHQAInput ):
2323 proxy = ActorProxy .create (
2424 actor_type = self ._actor_mhqa ,
2525 actor_id = ActorId (actor_id = data .thread_id ),
@@ -37,9 +37,8 @@ async def do_mhqa_response(self, data: MHQAInput):
3737 raw_body = data .model_dump_json ().encode (),
3838 )
3939 return result .decode ().strip ("\" '" )
40- # Start listening to the pub-sub topic for responses (non-blocking)
4140
42- async def do_get_history (self , data : MHQAHistoryInput ) -> str :
41+ async def do_mhqa_get_history (self , data : MHQAHistoryInput ) -> str :
4342 proxy = ActorProxy .create (
4443 actor_type = self ._actor_mhqa ,
4544 actor_id = ActorId (actor_id = data .thread_id ),
@@ -49,7 +48,7 @@ async def do_get_history(self, data: MHQAHistoryInput) -> str:
4948 result = await proxy .invoke_method (method = MHQAActorMethods .GetChatHistory )
5049 return result .decode ().strip ("\" '" )
5150
52- async def do_delete_history (self , data : MHQADeleteHistoryInput ) -> str :
51+ async def do_mhqa_delete_history (self , data : MHQADeleteHistoryInput ) -> str :
5352 proxy = ActorProxy .create (
5453 actor_type = self ._actor_mhqa ,
5554 actor_id = ActorId (actor_id = data .thread_id ),
@@ -75,11 +74,11 @@ async def execute(self, context: RequestContext, event_queue: EventQueue):
7574 response = None
7675 match message_payload .skill :
7776 case MHQAAgentSkills .Respond :
78- response = await self .do_mhqa_response (data = message_payload .data )
77+ response = await self .do_mhqa_respond (data = message_payload .data )
7978 case MHQAAgentSkills .GetChatHistory :
80- response = await self .do_get_history (data = message_payload .data )
79+ response = await self .do_mhqa_get_history (data = message_payload .data )
8180 case MHQAAgentSkills .ResetChatHistory :
82- response = await self .do_delete_history (data = message_payload .data )
81+ response = await self .do_mhqa_delete_history (data = message_payload .data )
8382 case _:
8483 raise ValueError (f"Unknown skill '{ message_payload .skill } ' requested!" )
8584 if response :
0 commit comments