Fixes error with providers that don't have model_id (#10966)

## Description
Fixes error with using the chain for providers that don't have
`model_id` field.


![image](https://github.com/langchain-ai/langchain/assets/289369/a86074cf-6c99-4390-a135-b3af7a4f0827)
This commit is contained in:
Piyush Jain 2023-09-23 15:34:28 -07:00 committed by GitHub
parent 7b13292e35
commit 8602a32b7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ def use_simple_prompt(llm: BaseLanguageModel) -> bool:
return True return True
# Bedrock anthropic # Bedrock anthropic
if llm.model_id and "anthropic" in llm.model_id: # type: ignore if hasattr(llm, "model_id") and "anthropic" in llm.model_id: # type: ignore
return True return True
return False return False