Enable passing custom headers

This commit is contained in:
Vik Paruchuri
2025-10-30 10:21:11 -04:00
parent 607205211a
commit 7cf96f3911

View File

@@ -25,10 +25,12 @@ def generate_vllm(
max_output_tokens: int = None,
max_retries: int = None,
max_workers: int | None = None,
custom_headers: dict | None = None,
) -> List[GenerationResult]:
client = OpenAI(
api_key=settings.VLLM_API_KEY,
base_url=settings.VLLM_API_BASE,
default_headers=custom_headers,
)
model_name = settings.VLLM_MODEL_NAME