refactor: Update ToolCallingAgentComponent description

Update the description of the ToolCallingAgentComponent class in ToolCallingAgent.py to improve clarity and conciseness.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-23 01:53:02 -03:00
commit ab9083d066

View file

@ -12,9 +12,7 @@ from langflow.schema import Data
class ToolCallingAgentComponent(Component):
display_name: str = "Tool Calling Agent"
description: str = (
"Agent that uses tools. Only models that are compatible with function calling are supported."
)
description: str = "Agent that uses tools. Only models that are compatible with function calling are supported."
icon = "LangChain"
inputs = [
@ -100,7 +98,7 @@ class ToolCallingAgentComponent(Component):
return Message(text=result_string)
def convert_chat_history(self, chat_history: List[Data]) -> List[Dict[str, str]]:
def convert_chat_history(self, chat_history: List[Data]) -> List[dict[str, str]]:
messages = []
for item in chat_history:
role = "user" if item.sender == "User" else "assistant"