diff --git a/framework/platforms/qq_bot.py b/framework/platforms/qq_bot.py index 4b7e6d87..708c56f9 100644 --- a/framework/platforms/qq_bot.py +++ b/framework/platforms/qq_bot.py @@ -26,7 +26,7 @@ async def post_response_function(client, message: Message, text=None, image=None send_payload['channel_id'] = message.channel_id if text: - send_payload['content'] = text + send_payload['content'] = text.replace('.', ' . ') if image: send_payload['file_image'] = await image.get_bytes() await send_func(**send_payload) diff --git a/framework/prompt_engine.py b/framework/prompt_engine.py index 1d8c0724..16540f33 100644 --- a/framework/prompt_engine.py +++ b/framework/prompt_engine.py @@ -118,7 +118,10 @@ async def execute_action_block(action_flow: List[ActionBlockBaseModel], context: for i in range(block.retry + 1): try: result = action_callable(**args) - if result and inspect.iscoroutine(result): + if result and inspect.isasyncgen(result): + async for result in result: + pass + elif result and inspect.iscoroutine(result): result = await result if block.name: