mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
mv connection_manager init (#3901)
Co-authored-by: Yuanle Liu <yuanlehome@163.com>
This commit is contained in:
@@ -51,12 +51,6 @@ class OpenAIServingCompletion:
|
||||
else:
|
||||
self.master_ip = "0.0.0.0"
|
||||
|
||||
async def _ensure_connection_manager(self):
|
||||
"""ensure connection manager initialized"""
|
||||
if not self.engine_client.connection_initialized:
|
||||
await self.engine_client.connection_manager.initialize()
|
||||
self.engine_client.connection_initialized = True
|
||||
|
||||
def _check_master(self):
|
||||
return self.engine_client.is_master
|
||||
|
||||
@@ -208,7 +202,6 @@ class OpenAIServingCompletion:
|
||||
try:
|
||||
request_ids = [f"{request_id}-{i}" for i in range(num_choices)]
|
||||
# create dealer
|
||||
await self._ensure_connection_manager()
|
||||
dealer, response_queue = await self.engine_client.connection_manager.get_connection(
|
||||
request_id, num_choices
|
||||
)
|
||||
@@ -314,7 +307,6 @@ class OpenAIServingCompletion:
|
||||
Process the stream completion request.
|
||||
"""
|
||||
try:
|
||||
await self._ensure_connection_manager()
|
||||
dealer, response_queue = await self.engine_client.connection_manager.get_connection(
|
||||
request_id, num_choices
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user