langflow icon indicating copy to clipboard operation
langflow copied to clipboard

fix: fixes the error in order of tool metadata and tool metadata updation

Open edwinjosechittilappilly opened this issue 2 months ago • 2 comments

This pull request includes updates to the component_tool.py, constants.py, and component.py files to add and handle tags for tools. The changes primarily focus on adding a new "tags" field to the tool metadata and ensuring that the tags are properly managed and utilized. This is used for a safety check to ensure that the tool_metadata is updated only if the tags matches.

Key changes include:

Tag Management Enhancements:

  • src/backend/base/langflow/base/tools/component_tool.py: Added the tags field to the tool creation process in the get_tools method. [1] [2]
  • src/backend/base/langflow/base/tools/component_tool.py: Introduced a safety check in the update_tools_metadata method to avoid updating the tool metadata if the tags are not the same.

Tool Metadata Updates:

  • src/backend/base/langflow/base/tools/constants.py: Added a new entry for "tags" in the tool metadata constants.
  • src/backend/base/langflow/custom/custom_component/component.py: Updated the _build_tools_metadata_input method to include the tags field in the tool metadata input.

edwinjosechittilappilly avatar Dec 13 '24 16:12 edwinjosechittilappilly