mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
fix
This commit is contained in:
@@ -618,7 +618,7 @@ async def generate_embeddings(
|
|||||||
model = f"{model}:latest"
|
model = f"{model}:latest"
|
||||||
|
|
||||||
if model in app.state.MODELS:
|
if model in app.state.MODELS:
|
||||||
url_idx = random.choice(app.state.MODELS[form_data.model]["urls"])
|
url_idx = random.choice(app.state.MODELS[model]["urls"])
|
||||||
else:
|
else:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=400,
|
status_code=400,
|
||||||
@@ -683,7 +683,7 @@ async def generate_completion(
|
|||||||
model = f"{model}:latest"
|
model = f"{model}:latest"
|
||||||
|
|
||||||
if model in app.state.MODELS:
|
if model in app.state.MODELS:
|
||||||
url_idx = random.choice(app.state.MODELS[form_data.model]["urls"])
|
url_idx = random.choice(app.state.MODELS[model]["urls"])
|
||||||
else:
|
else:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=400,
|
status_code=400,
|
||||||
@@ -786,7 +786,7 @@ async def generate_chat_completion(
|
|||||||
model = f"{model}:latest"
|
model = f"{model}:latest"
|
||||||
|
|
||||||
if model in app.state.MODELS:
|
if model in app.state.MODELS:
|
||||||
url_idx = random.choice(app.state.MODELS[form_data.model]["urls"])
|
url_idx = random.choice(app.state.MODELS[model]["urls"])
|
||||||
else:
|
else:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=400,
|
status_code=400,
|
||||||
@@ -895,7 +895,7 @@ async def generate_openai_chat_completion(
|
|||||||
model = f"{model}:latest"
|
model = f"{model}:latest"
|
||||||
|
|
||||||
if model in app.state.MODELS:
|
if model in app.state.MODELS:
|
||||||
url_idx = random.choice(app.state.MODELS[form_data.model]["urls"])
|
url_idx = random.choice(app.state.MODELS[model]["urls"])
|
||||||
else:
|
else:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=400,
|
status_code=400,
|
||||||
|
|||||||
Reference in New Issue
Block a user