Skip to content

Commit 5438bf9

Browse files
committed
fix signature for AzureOpenAILLM
1 parent 84620a7 commit 5438bf9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

application/llm/openai.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,17 @@ def _supports_tools(self):
137137
class AzureOpenAILLM(OpenAILLM):
138138

139139
def __init__(
140-
self, openai_api_key, openai_api_base, openai_api_version, deployment_name
140+
self, api_key, user_api_key, *args, **kwargs
141141
):
142-
super().__init__(openai_api_key)
142+
143+
super().__init__(api_key)
143144
self.api_base = (settings.OPENAI_API_BASE,)
144145
self.api_version = (settings.OPENAI_API_VERSION,)
145146
self.deployment_name = (settings.AZURE_DEPLOYMENT_NAME,)
146147
from openai import AzureOpenAI
147148

148149
self.client = AzureOpenAI(
149-
api_key=openai_api_key,
150+
api_key=api_key,
150151
api_version=settings.OPENAI_API_VERSION,
151-
api_base=settings.OPENAI_API_BASE,
152-
deployment_name=settings.AZURE_DEPLOYMENT_NAME,
152+
azure_endpoint=settings.OPENAI_API_BASE
153153
)

0 commit comments

Comments
 (0)