mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
benchmark工具支持受限解码场景指定response_format (#4718)
This commit is contained in:
@@ -51,6 +51,7 @@ class RequestFuncInput:
|
||||
ignore_eos: bool = False
|
||||
language: Optional[str] = None
|
||||
debug: bool = False
|
||||
response_format: Optional[dict] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -93,8 +94,11 @@ async def async_request_eb_openai_chat_completions(
|
||||
"stream_options": {
|
||||
"include_usage": True,
|
||||
"continuous_usage_stats": True,
|
||||
},
|
||||
}
|
||||
}
|
||||
if request_func_input.response_format:
|
||||
payload["response_format"] =request_func_input.response_format
|
||||
|
||||
# 超参由yaml传入
|
||||
payload.update(request_func_input.hyper_parameters)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user