Skip to content

Commit 7deb28c

Browse files
set LLM_MODEL=default in compose env instead of app fallback
1 parent ed909d1 commit 7deb28c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

samples/managed-llm-provider/app/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
# Set the environment variables for the chat model
2121
LLM_URL = os.getenv("LLM_URL", default_openai_base_url) + "chat/completions"
22-
# Fallback LLM Model if not set in environment
23-
MODEL_ID = os.getenv("LLM_MODEL", "default")
22+
# Fallback to OpenAI Model if not set in environment
23+
MODEL_ID = os.getenv("LLM_MODEL", "gpt-4-turbo")
2424

2525
# Get the API key for the LLM
2626
# For development, you have the option to use your local API key. In production, the LLM gateway service will override the need for it.

samples/managed-llm-provider/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
- "8000:8000"
88
restart: always
99
environment:
10-
- LLM_MODEL # LLM model ID used
10+
- LLM_MODEL=default
1111
# For other models, see https://docs.defang.io/docs/concepts/managed-llms/openai-access-gateway#model-mapping
1212
healthcheck:
1313
test: ["CMD", "python3", "-c", "import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read()", "http://localhost:8000/"]

0 commit comments

Comments
 (0)