mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-31 03:20:00 +00:00
Fix openai_completion tests for ollama
When called via the OpenAI API, ollama is responding with more brief responses than when called via its native API. This adjusts the prompting for its OpenAI calls to ask it to be more verbose.
This commit is contained in:
parent
52b4766949
commit
ef684ff178
2 changed files with 9 additions and 2 deletions
|
|
@ -348,6 +348,9 @@ class OllamaInferenceAdapter(
|
|||
top_p: Optional[float] = None,
|
||||
user: Optional[str] = None,
|
||||
) -> OpenAICompletion:
|
||||
if not isinstance(prompt, str):
|
||||
raise ValueError("Ollama does not support non-string prompts for completion")
|
||||
|
||||
model_obj = await self._get_model(model)
|
||||
params = {
|
||||
k: v
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue