File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,10 @@ services:
120120 DB_PORT : ${DB_PORT:-9090}
121121 DB_GRPC_PORT : ${DB_GRPC_PORT:-50051}
122122 OPEN_WEB_UI_API_KEY : ${OPEN_WEB_UI_API_KEY}
123+ SERVER_URL : ${SERVER_URL:-http://localhost:9091}
124+ CLIENT_URL : ${CLIENT_URL:-http://localhost:3000}
125+ GENAI_URL : ${GENAI_URL:-http://localhost:8000}
126+ API_URL : ${API_URL:-https://gpu.aet.cit.tum.de/api/chat/completions}
123127 depends_on :
124128 - weaviate
125129 volumes :
Original file line number Diff line number Diff line change 1- OPEN_WEB_UI_API_KEY = your-api-key-here
1+ OPEN_WEB_UI_API_KEY = your-api-key-here
2+ API_URL = " https://your-api-url-here"
Original file line number Diff line number Diff line change 2121
2222# Environment configuration
2323OPEN_WEB_UI_API_KEY = os .getenv ("OPEN_WEB_UI_API_KEY" )
24- API_URL = "https://gpu.aet.cit.tum.de/api/chat/completions"
25-
24+ API_URL = os .getenv ("API_URL" )
25+ SERVER_URL = os .getenv ("SERVER_URL" )
26+ CLIENT_URL = os .getenv ("CLIENT_URL" )
27+ GENAI_URL = os .getenv ("GENAI_URL" )
2628
2729class OpenWebUILLM (LLM ):
2830 api_url : str = API_URL
@@ -97,14 +99,14 @@ def custom_openapi():
9799 title = app .title ,
98100 version = app .version ,
99101 routes = app .routes ,
100- servers = [{"url" : "http://localhost:8000" }],
102+ servers = [{"url" : GENAI_URL }],
101103 )
102104 )
103105
104106
105107app .add_middleware (
106108 CORSMiddleware ,
107- allow_origins = ["http://localhost:3000" , "http://localhost:9091" ],
109+ allow_origins = [CLIENT_URL , SERVER_URL ],
108110 allow_credentials = True ,
109111 allow_methods = ["*" ],
110112 allow_headers = ["*" ],
You can’t perform that action at this time.
0 commit comments