File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -193,9 +193,9 @@ def __init__(
193
193
)
194
194
195
195
if azure_deployment is not None :
196
- base_url = f"{ azure_endpoint } /openai/deployments/{ azure_deployment } "
196
+ base_url = f"{ azure_endpoint . rstrip ( '/' ) } /openai/deployments/{ azure_deployment } "
197
197
else :
198
- base_url = f"{ azure_endpoint } /openai"
198
+ base_url = f"{ azure_endpoint . rstrip ( '/' ) } /openai"
199
199
else :
200
200
if azure_endpoint is not None :
201
201
raise ValueError ("base_url and azure_endpoint are mutually exclusive" )
@@ -433,9 +433,9 @@ def __init__(
433
433
)
434
434
435
435
if azure_deployment is not None :
436
- base_url = f"{ azure_endpoint } /openai/deployments/{ azure_deployment } "
436
+ base_url = f"{ azure_endpoint . rstrip ( '/' ) } /openai/deployments/{ azure_deployment } "
437
437
else :
438
- base_url = f"{ azure_endpoint } /openai"
438
+ base_url = f"{ azure_endpoint . rstrip ( '/' ) } /openai"
439
439
else :
440
440
if azure_endpoint is not None :
441
441
raise ValueError ("base_url and azure_endpoint are mutually exclusive" )
You can’t perform that action at this time.
0 commit comments