mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-30 11:39:03 +00:00
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"
This commit is contained in:
parent
21335d43b2
commit
145ff23fb1
@ -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…
Reference in New Issue
Block a user