mirror of
https://github.com/hwchase17/langchain
synced 2024-11-04 06:00:26 +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. ![image](https://github.com/langchain-ai/langchain/assets/289369/a86074cf-6c99-4390-a135-b3af7a4f0827)
This commit is contained in:
parent
7b13292e35
commit
8602a32b7e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user