fixing openai models relabling for ollama client libs
This commit is contained in:
parent
ed84be2760
commit
da8b165f4a
1 changed files with 4 additions and 0 deletions
|
|
@ -1042,6 +1042,10 @@ async def tags_proxy(request: Request):
|
|||
model['model'] = model['id']
|
||||
else:
|
||||
model['id'] = model['model']
|
||||
if not "name" in model.keys(): # Relable OpenAI models with Ollama Model.name from Model.model to have model,name keys
|
||||
model['name'] = model['model']
|
||||
else:
|
||||
model['id'] = model['model']
|
||||
models['models'] += modellist
|
||||
|
||||
# 2. Return a JSONResponse with a deduplicated list of unique models for inference
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue