relabling openai models with ollama compatible tags
This commit is contained in:
parent
6c9ffad834
commit
ed84be2760
1 changed files with 5 additions and 0 deletions
|
|
@ -1037,6 +1037,11 @@ async def tags_proxy(request: Request):
|
|||
|
||||
models = {'models': []}
|
||||
for modellist in all_models:
|
||||
for model in modellist:
|
||||
if not "model" in model.keys(): # Relable OpenAI models with Ollama Model.model from Model.id
|
||||
model['model'] = model['id']
|
||||
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