diff --git a/api/core/app/apps/advanced_chat/app_runner.py b/api/core/app/apps/advanced_chat/app_runner.py index 96e9319dda58d2..38566217007f46 100644 --- a/api/core/app/apps/advanced_chat/app_runner.py +++ b/api/core/app/apps/advanced_chat/app_runner.py @@ -255,6 +255,12 @@ def _stream_output(self, queue_manager: AppQueueManager, ) index += 1 time.sleep(0.01) + else: + queue_manager.publish( + QueueTextChunkEvent( + text=text + ), PublishFrom.APPLICATION_MANAGER + ) queue_manager.publish( QueueStopEvent(stopped_by=stopped_by), diff --git a/api/core/tools/tool/api_tool.py b/api/core/tools/tool/api_tool.py index c8b683f9ef14ac..69e3dfa0612e8a 100644 --- a/api/core/tools/tool/api_tool.py +++ b/api/core/tools/tool/api_tool.py @@ -238,7 +238,7 @@ def _convert_body_property_type(self, property: dict[str, Any], value: Any) -> A return int(value) elif property['type'] == 'number': # check if it is a float - if '.' in value: + if '.' in str(value): return float(value) else: return int(value)