From 6edbfa924df0d1809028296d02dd328bd8139529 Mon Sep 17 00:00:00 2001 From: Harry Mellor <19981378+hmellor@users.noreply.github.com> Date: Fri, 21 Mar 2025 02:18:36 +0000 Subject: [PATCH] Mention `extra_body` as a way top pass vLLM only parameters using the OpenAI client (#15240) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> --- docs/source/serving/openai_compatible_server.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/source/serving/openai_compatible_server.md b/docs/source/serving/openai_compatible_server.md index 0880a4530d8c2..a6ec05f45b69b 100644 --- a/docs/source/serving/openai_compatible_server.md +++ b/docs/source/serving/openai_compatible_server.md @@ -29,6 +29,11 @@ completion = client.chat.completions.create( print(completion.choices[0].message) ``` +:::{tip} +vLLM supports some parameters that are not supported by OpenAI, `top_k` for example. +You can pass these parameters to vLLM using the OpenAI client in the `extra_body` parameter of your requests, i.e. `extra_body={"top_k": 50}` for `top_k`. +::: + ## Supported APIs We currently support the following OpenAI APIs: