mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-31 03:20:00 +00:00
Add prompt_logprobs and guided_choice to OpenAI completions
This adds the vLLM-specific extra_body parameters of prompt_logprobs and guided_choice to our openai_completion inference endpoint. The plan here would be to expand this to support all common optional parameters of any of the OpenAI providers, allowing each provider to use or ignore these parameters based on whether their server supports them. Signed-off-by: Ben Browning <bbrownin@redhat.com>
This commit is contained in:
parent
ef684ff178
commit
ac5dc8fae2
11 changed files with 98 additions and 5 deletions
|
|
@ -347,6 +347,8 @@ class OllamaInferenceAdapter(
|
|||
temperature: Optional[float] = None,
|
||||
top_p: Optional[float] = None,
|
||||
user: Optional[str] = None,
|
||||
guided_choice: Optional[List[str]] = None,
|
||||
prompt_logprobs: Optional[int] = None,
|
||||
) -> OpenAICompletion:
|
||||
if not isinstance(prompt, str):
|
||||
raise ValueError("Ollama does not support non-string prompts for completion")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue