mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
abort requests (#6992)
This commit is contained in:
@@ -586,6 +586,8 @@ class OpenAIServingCompletion:
|
||||
output,
|
||||
tool_called[idx],
|
||||
)
|
||||
if res.get("error_msg") is not None and "Aborted" in res["error_msg"]:
|
||||
choices[-1].finish_reason = "abort"
|
||||
inference_start_time[idx] = 0
|
||||
|
||||
send_idx = output.get("send_idx")
|
||||
@@ -726,6 +728,8 @@ class OpenAIServingCompletion:
|
||||
output,
|
||||
False,
|
||||
)
|
||||
if final_res.get("error_msg", None) is not None and "Aborted" in final_res["error_msg"]:
|
||||
finish_reason = "abort"
|
||||
|
||||
choice_data = CompletionResponseChoice(
|
||||
token_ids=token_ids,
|
||||
|
||||
Reference in New Issue
Block a user