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