Performance error

if i send request to action server by postman only 3ms,but in rasa run , the same request need 400ms

Hi @guhua, thank you for your message. Could you please share some more context? Are you using Rasa Pro?

this is source code,it create session every time with 2s,
async with self.session() as session: async with session.request( method, url, headers=headers, params=self.combine_parameters(kwargs), compress=compress, ssl=sslcontext, **kwargs, ) as response:

but instead with this, start_at = time.time() response = await self.httpx_client.request( method, url, headers=headers, params=self.combine_parameters(kwargs), **kwargs) logger.debug(f"httpx time: {time.time()} cost: {time.time() - start_at}") return response.json() only cost 20ms

Hi @guhua, thank you for your response. A couple of questions to understand your issue: is the latency too great when rasa pro server calls the action server? How was this calculated?

One way to improve latency is to use direct custom action or gRPC instead of HTTP when launching the action server, you find docs here: Rasa Action Server gRPC API | Rasa Documentation

hi,nothing in action server, just mocker data, i print the cost time