Add files via upload
fixing /v1/models: - relabel model.id with model.name for OpenAI compliance
This commit is contained in:
parent
7ed872379b
commit
9f32fcf75d
1 changed files with 3 additions and 0 deletions
|
|
@ -1161,6 +1161,9 @@ async def openai_models_proxy(request: Request):
|
|||
|
||||
models = {'data': []}
|
||||
for modellist in all_models:
|
||||
for model in modellist:
|
||||
if not id in model.keys(): # Relable Ollama models with OpenAI Model.id from Model.name
|
||||
model['id'] = model['name']
|
||||
models['data'] += 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