diff --git a/rasa_sdk/grpc_server.py b/rasa_sdk/grpc_server.py index 5fce7dc8a..ebbf26735 100644 --- a/rasa_sdk/grpc_server.py +++ b/rasa_sdk/grpc_server.py @@ -5,7 +5,6 @@ import asyncio import grpc -import utils import logging import ssl import types @@ -36,6 +35,7 @@ get_tracer_and_context, TracerProvider, ) +from rasa_sdk.utils import check_version_compatibility, number_of_sanic_workers logger = logging.getLogger(__name__) @@ -71,7 +71,7 @@ async def webhook( self.tracer_provider, request ) with tracer.start_as_current_span(span_name, context=tracer_context): - utils.check_version_compatibility(request.version) + check_version_compatibility(request.version) try: action_call = MessageToDict(request, preserving_proto_field_name=True) result = await self.executor.run(action_call) @@ -155,7 +155,7 @@ async def run_grpc( ssl_password: Password for the SSL key file. endpoints: Path to the endpoints file. """ - workers = utils.number_of_sanic_workers() + workers = number_of_sanic_workers() server = aio.server(futures.ThreadPoolExecutor(max_workers=workers)) initialise_interrupts(server) executor = ActionExecutor()