File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
06_gpu_and_ml/llm-serving/openai_compatible Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ def main():
5959 default = None ,
6060 help = "The workspace where the LLM server app is hosted, defaults to your current Modal workspace" ,
6161 )
62+ parser .add_argument (
63+ "--environment" ,
64+ type = str ,
65+ default = None ,
66+ help = "The environment in your Modal workspace where the LLM server app is hosted, defaults to your current environment" ,
67+ )
6268 parser .add_argument (
6369 "--app-name" ,
6470 type = str ,
@@ -125,7 +131,13 @@ def main():
125131
126132 workspace = args .workspace or modal .config ._profile
127133
128- client .base_url = f"https://{ workspace } --{ args .app_name } -{ args .function_name } .modal.run/v1"
134+ environment = args .environment or modal .config .config ["environment" ]
135+
136+ prefix = workspace + (f"-{ environment } " if environment else "" )
137+
138+ client .base_url = (
139+ f"https://{ prefix } --{ args .app_name } -{ args .function_name } .modal.run/v1"
140+ )
129141
130142 if args .model :
131143 model_id = args .model
You can’t perform that action at this time.
0 commit comments