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)
pull/10979/head
Piyush Jain 11 months ago committed by GitHub
parent 7b13292e35
commit 8602a32b7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -68,7 +68,7 @@ def use_simple_prompt(llm: BaseLanguageModel) -> bool:
return True
# 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 False

Loading…
Cancel
Save