Skip to content

Commit ee8a3a2

Browse files
committed
fix llm_url link
1 parent 7deb28c commit ee8a3a2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

samples/managed-llm/app/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
# Configure basic logging
1616
logging.basicConfig(level=logging.INFO)
1717

18-
default_openai_base_url = "https://api.openai.com/v1/"
18+
default_openai_base_url = "https://api.openai.com/v1/chat/completions"
1919

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

samples/managed-llm/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-
- ENDPOINT_URL=http://llm/api/v1/chat/completions # endpoint to the gateway service
10+
- LLM_URL=http://llm/api/v1/chat/completions # endpoint to the gateway service
1111
- MODEL=default # LLM model ID used for the gateway.
1212
# For other models, see https://docs.defang.io/docs/concepts/managed-llms/openai-access-gateway#model-mapping
1313
- OPENAI_API_KEY=FAKE_TOKEN # the actual value will be ignored when using the gateway, but it should match the one in the llm service

0 commit comments

Comments
 (0)