fix(agent_utils.py): add check for model attribute to prevent errors when model does not have 'model' attribute
This commit is contained in:
parent
75636f0477
commit
bef504d756
|
|
@ -102,6 +102,9 @@ def build_agent_kwargs(
|
|||
):
|
||||
|
||||
def wrapped_state_modifier(state: AgentState) -> list[BaseMessage]:
|
||||
if not hasattr(model, 'model'):
|
||||
return state_modifier(state, model, max_input_tokens=max_input_tokens)
|
||||
|
||||
if any(
|
||||
pattern in model.model
|
||||
for pattern in ["claude-3.5", "claude3.5", "claude-3-5"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue