File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -193,9 +193,9 @@ def __init__(
193193 )
194194
195195 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 } "
197197 else :
198- base_url = f"{ azure_endpoint } /openai"
198+ base_url = f"{ azure_endpoint . rstrip ( '/' ) } /openai"
199199 else :
200200 if azure_endpoint is not None :
201201 raise ValueError ("base_url and azure_endpoint are mutually exclusive" )
@@ -433,9 +433,9 @@ def __init__(
433433 )
434434
435435 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 } "
437437 else :
438- base_url = f"{ azure_endpoint } /openai"
438+ base_url = f"{ azure_endpoint . rstrip ( '/' ) } /openai"
439439 else :
440440 if azure_endpoint is not None :
441441 raise ValueError ("base_url and azure_endpoint are mutually exclusive" )
You can’t perform that action at this time.
0 commit comments