mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-26 07:52:29 +08:00
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:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user