MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / __init__

Method __init__

fastdeploy/engine/async_llm.py:277–308  ·  view source on GitHub ↗

Initializes the AsyncLLM client with the provided configuration. Args: cfg (Config): Config object containing all the configuration parameters.

(self, cfg, pid)

Source from the content-addressed store, hash-verified

275 return cls(cfg=config, pid=pid)
276
277 def __init__(self, cfg, pid):
278 """
279 Initializes the AsyncLLM client with the provided configuration.
280
281 Args:
282 cfg (Config): Config object containing all the configuration parameters.
283 """
284 super().__init__(cfg, pid)
285 self.cfg = cfg
286 self.running = True
287 self._prompt_metadata: Dict[str, Dict[str, Any]] = {}
288
289 self.input_processor = InputPreprocessor(
290 cfg.model_config,
291 cfg.structured_outputs_config.reasoning_parser,
292 cfg.limit_mm_per_prompt,
293 cfg.mm_processor_kwargs,
294 cfg.tool_parser,
295 )
296 # Create data processor
297 self.data_processor = self.input_processor.create_processor()
298
299 # Create high-performance async connection manager
300 self.connection_manager = None
301 self.request_client = None
302
303 # Output processor uses data_processor for post-processing engine outputs
304 self.output_processor = AsyncOutputProcessor(self.data_processor)
305
306 self._finalizer = weakref.finalize(self, self._exit_sub_services)
307
308 main_process_metrics.set_cache_config_info(obj=self.cfg.cache_config)
309
310 async def init_connections(self):
311 """Initialize high-performance ZMQ connections"""

Callers

nothing calls this directly

Calls 4

InputPreprocessorClass · 0.90
set_cache_config_infoMethod · 0.80
create_processorMethod · 0.45

Tested by

no test coverage detected