Skip to content

Commit 0ac27bc

Browse files
committed
Get Ollama working
1 parent 5c708e0 commit 0ac27bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/fastapi_app/dependencies.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class FastAPIAppContext(BaseModel):
2929
openai_chat_model: str
3030
openai_embed_model: str
3131
openai_embed_dimensions: int
32-
openai_chat_deployment: str
33-
openai_embed_deployment: str
32+
openai_chat_deployment: str | None
33+
openai_embed_deployment: str | None
3434

3535

3636
async def common_parameters():
@@ -51,10 +51,10 @@ async def common_parameters():
5151
openai_chat_deployment = os.getenv("AZURE_OPENAI_CHAT_DEPLOYMENT", "gpt-35-turbo")
5252
openai_chat_model = os.getenv("AZURE_OPENAI_CHAT_MODEL", "gpt-35-turbo")
5353
elif OPENAI_CHAT_HOST == "ollama":
54-
openai_chat_deployment = "phi3:3.8b"
54+
openai_chat_deployment = None
5555
openai_chat_model = os.getenv("OLLAMA_CHAT_MODEL", "phi3:3.8b")
5656
else:
57-
openai_chat_deployment = "gpt-3.5-turbo"
57+
openai_chat_deployment = None
5858
openai_chat_model = os.getenv("OPENAICOM_CHAT_MODEL", "gpt-3.5-turbo")
5959
return FastAPIAppContext(
6060
openai_chat_model=openai_chat_model,

0 commit comments

Comments
 (0)