[Frontend] Use request id from header (#10968)

Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
This commit is contained in:
Joe Runde
2024-12-09 22:46:29 -07:00
committed by GitHub
parent 391d7b2763
commit 980ad394a8
8 changed files with 27 additions and 13 deletions

View File

@@ -176,7 +176,8 @@ class OpenAIServingChat(OpenAIServing):
logger.exception("Error in preprocessing prompt inputs")
return self.create_error_response(str(e))
request_id = f"chatcmpl-{request.request_id}"
request_id = "chatcmpl-" \
f"{self._base_request_id(raw_request, request.request_id)}"
request_metadata = RequestResponseMetadata(request_id=request_id)
if raw_request: