fix ollama logic

This commit is contained in:
Samuel 2024-11-01 06:09:41 +00:00
parent 2ada8cd5ad
commit b4f1ea6013

View File

@ -574,6 +574,7 @@ async def handle_nonstreaming_response(request: Request, response: Response,
response_dict = json.loads(content) response_dict = json.loads(content)
body = json.loads(request._body) body = json.loads(request._body)
is_ollama = False
if app.state.MODELS[body["model"]]["owned_by"] == "ollama": if app.state.MODELS[body["model"]]["owned_by"] == "ollama":
is_ollama = True is_ollama = True
is_openai = not is_ollama is_openai = not is_ollama