Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions vllm/entrypoints/openai/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ class ChatCompletionRequest(OpenAIBaseModel):
spaces_between_special_tokens: bool = True
truncate_prompt_tokens: Optional[Annotated[int, Field(ge=1)]] = None
prompt_logprobs: Optional[int] = None
request_id: str = Field(default_factory=lambda: f"{random_uuid()}")
Comment thread
DarkLight1337 marked this conversation as resolved.
Outdated
# doc: end-chat-completion-sampling-params

# doc: begin-chat-completion-extra-params
Expand Down
3 changes: 2 additions & 1 deletion vllm/entrypoints/openai/serving_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ async def create_chat_completion(
"\"auto\" tool choice requires "
"--enable-auto-tool-choice and --tool-call-parser to be set")

request_id = f"chat-{random_uuid()}"
request_id = (f"chat-{request.request_id}" if request.request_id
is not None else f"chat-{random_uuid()}")
Comment thread
DarkLight1337 marked this conversation as resolved.
Outdated

request_metadata = RequestResponseMetadata(request_id=request_id)
if raw_request:
Expand Down