correct the llm type of AzureOpenAI (#3721)

The llm type of AzureOpenAI was previously set to default, which is
openai. But since AzureOpenAI has different API from openai, it creates
problems when doing chain saving and loading. This PR corrected the llm
type of AzureOpenAI to "azure"
fix_agent_callbacks
sherylZhaoCode 1 year ago committed by GitHub
parent 21335d43b2
commit 145ff23fb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -589,6 +589,11 @@ class AzureOpenAI(BaseOpenAI):
def _invocation_params(self) -> Dict[str, Any]:
return {**{"engine": self.deployment_name}, **super()._invocation_params}
@property
def _llm_type(self) -> str:
"""Return type of llm."""
return "azure"
class OpenAIChat(BaseLLM):
"""Wrapper around OpenAI Chat large language models.

Loading…
Cancel
Save