From 9091513c39d232fc89c3d4b91a55e01f50c2b73b Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 14 Apr 2024 16:52:59 -0400 Subject: [PATCH] fix --- backend/apps/ollama/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/apps/ollama/main.py b/backend/apps/ollama/main.py index 7ed41eb2e..7140cad9d 100644 --- a/backend/apps/ollama/main.py +++ b/backend/apps/ollama/main.py @@ -618,7 +618,7 @@ async def generate_embeddings( model = f"{model}:latest" 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: raise HTTPException( status_code=400, @@ -683,7 +683,7 @@ async def generate_completion( model = f"{model}:latest" 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: raise HTTPException( status_code=400, @@ -786,7 +786,7 @@ async def generate_chat_completion( model = f"{model}:latest" 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: raise HTTPException( status_code=400, @@ -895,7 +895,7 @@ async def generate_openai_chat_completion( model = f"{model}:latest" 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: raise HTTPException( status_code=400,