fix: handle unsupported LLM exception message (#4199)
* fix: handle unsupported LLM exception message * Update src/backend/base/langflow/components/agents/ToolCallingAgent.py Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * [autofix.ci] apply automated fixes --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
7dd85ac0fe
commit
c24b0d9ac4
1 changed files with 5 additions and 1 deletions
|
|
@ -43,4 +43,8 @@ class ToolCallingAgentComponent(LCToolsAgentComponent):
|
|||
("placeholder", "{agent_scratchpad}"),
|
||||
]
|
||||
prompt = ChatPromptTemplate.from_messages(messages)
|
||||
return create_tool_calling_agent(self.llm, self.tools, prompt)
|
||||
try:
|
||||
return create_tool_calling_agent(self.llm, self.tools, prompt)
|
||||
except NotImplementedError as e:
|
||||
message = f"{self.display_name} does not support tool calling." "Please try using a compatible model."
|
||||
raise NotImplementedError(message) from e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue