File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ def __init__(
168
168
open_ai_custom_url : Union [str , None ] = None ,
169
169
disable_batch : bool = False ,
170
170
):
171
- super ().__init__ (open_ai_model_name , open_ai_dimensions , disable_batch )
171
+ super ().__init__ (open_ai_deployment or open_ai_model_name , open_ai_dimensions , disable_batch )
172
172
self .open_ai_service = open_ai_service
173
173
if open_ai_service :
174
174
self .open_ai_endpoint = f"https://{ open_ai_service } .openai.azure.com"
@@ -194,8 +194,8 @@ class AuthArgs(TypedDict, total=False):
194
194
else :
195
195
raise TypeError ("Invalid credential type" )
196
196
197
- # For Azure OpenAI, we need to include the deployment in the URL
198
- base_url = f"{ self .open_ai_endpoint } /openai/deployments/ { self . open_ai_deployment } "
197
+ # For Azure OpenAI, we need to use the v1 endpoint
198
+ base_url = f"{ self .open_ai_endpoint } /openai/v1 "
199
199
200
200
return AsyncOpenAI (
201
201
base_url = base_url ,
You can’t perform that action at this time.
0 commit comments