mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
@@ -331,8 +331,8 @@ class OpenAIServingChat(OpenAiServingBase):
|
||||
# api_server_logger.debug(f"Client {ctx.request_id} received: {data}")
|
||||
# The logprob for handling the response
|
||||
choices: list[ChatCompletionResponseChoice] = []
|
||||
for choice_index, respose in accumula_output_map.items():
|
||||
choice = await self._create_chat_completion_choice(respose, ctx)
|
||||
for choice_index, response in accumula_output_map.items():
|
||||
choice = await self._create_chat_completion_choice(response, ctx)
|
||||
choices.append(choice)
|
||||
|
||||
choices = sorted(choices, key=lambda x: x.index)
|
||||
|
||||
@@ -302,9 +302,9 @@ class OpenAIServingCompletion(OpenAiServingBase):
|
||||
try:
|
||||
choices: List[CompletionResponseChoice] = []
|
||||
|
||||
for choice_index, respose_list in accumula_output_map.items():
|
||||
for choice_index, response_list in accumula_output_map.items():
|
||||
response: RequestOutput | None = None
|
||||
for response_current in respose_list:
|
||||
for response_current in response_list:
|
||||
if response_current.error_code != 200:
|
||||
raise ValueError("{}".format(response_current.error_msg))
|
||||
if response is None:
|
||||
|
||||
Reference in New Issue
Block a user