mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 04:40:38 +08:00
Fixed incorrect usage for Azure OpenAI API
This commit is contained in:
@ -87,8 +87,6 @@ class AiHandler:
|
|||||||
f"Generating completion with {model}"
|
f"Generating completion with {model}"
|
||||||
f"{(' from deployment ' + deployment_id) if deployment_id else ''}"
|
f"{(' from deployment ' + deployment_id) if deployment_id else ''}"
|
||||||
)
|
)
|
||||||
if self.azure:
|
|
||||||
model = self.azure + "/" + model
|
|
||||||
response = await acompletion(
|
response = await acompletion(
|
||||||
model=model,
|
model=model,
|
||||||
deployment_id=deployment_id,
|
deployment_id=deployment_id,
|
||||||
@ -97,6 +95,7 @@ class AiHandler:
|
|||||||
{"role": "user", "content": user}
|
{"role": "user", "content": user}
|
||||||
],
|
],
|
||||||
temperature=temperature,
|
temperature=temperature,
|
||||||
|
azure=self.azure,
|
||||||
force_timeout=get_settings().config.ai_timeout
|
force_timeout=get_settings().config.ai_timeout
|
||||||
)
|
)
|
||||||
except (APIError, Timeout, TryAgain) as e:
|
except (APIError, Timeout, TryAgain) as e:
|
||||||
|
Reference in New Issue
Block a user