Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support extra_body Parameter for Advanced Model Features #898

Open
wqj97 opened this issue Nov 13, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@wqj97
Copy link

wqj97 commented Nov 13, 2024

Background
vLLM currently supports various model features through configuration parameters, but lacks support for passing additional model-specific parameters through extra_body, which is particularly important for features like structured output.
https://github.com/vllm-project/vllm/blob/v0.6.0/vllm/engine/arg_utils.py#L276

Current OpenAI implementation

completion = client.chat.completions.create(
    model="gpt-3.5-turbo",
    messages=[{"role": "user", "content": "Generate a user profile"}],
    extra_body={
        "guided_json": Test.schema_json,
        "guided_decoding_backend": "lm-format-enforcer"
    }
)

Proposed implementation

resp, err := integrations.LLMClient.Client.CreateChatCompletion(
		ctx,
		openai.ChatCompletionRequest{
			Model: "...",
			Messages: []openai.ChatCompletionMessage{
				...
			},
			ExtraBody: map[string]any{
				....
			},
		},
	)
@wqj97 wqj97 added the enhancement New feature or request label Nov 13, 2024
@nagar-ajay
Copy link
Contributor

This can be useful incase of other engines as well e.g. Nvidia NIMs - https://build.nvidia.com/nvidia/nv-embedqa-e5-v5?snippet_tab=Python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants