mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-01 02:50:47 +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:
@@ -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
|
||||
|
Reference in New Issue
Block a user