langchain/chat_models/base.py/SimpleChatModel/_agenerate
class SimpleChatModel:    async def _agenerate(
        self,
        messages: List[BaseMessage],
        stop: Optional[List[str]] = None,
        run_manager: Optional[AsyncCallbackManagerForLLMRun] = None,
    ) -> ChatResult:
        func = partial(self._generate, messages, stop=stop, run_manager=run_manager)
        return await asyncio.get_event_loop().run_in_executor(None, func)