mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 14:35:50 +08:00
fix: Replace HandleInput with ToolsInput for dynamic outputs
- ToolsInput has real_time_refresh=True hardcoded and is designed for tool selection - This should properly trigger update_outputs when tools are added/removed - ToolsInput is specifically built for dynamic tool behavior unlike HandleInput
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
from typing import Any
|
||||
|
||||
from lfx.custom import Component
|
||||
from lfx.io import BoolInput, HandleInput, MessageInput, MessageTextInput, MultilineInput, Output
|
||||
from lfx.io import BoolInput, MessageInput, MessageTextInput, MultilineInput, Output
|
||||
from lfx.inputs import ToolsInput
|
||||
from lfx.schema.message import Message
|
||||
|
||||
|
||||
@ -30,14 +31,11 @@ class ToolRouterComponent(Component):
|
||||
info="The primary text input for tool selection.",
|
||||
required=True,
|
||||
),
|
||||
HandleInput(
|
||||
ToolsInput(
|
||||
name="tools",
|
||||
display_name="Tools",
|
||||
input_types=["Tool"],
|
||||
is_list=True,
|
||||
required=True,
|
||||
info="Tools that can be selected based on the input categorization.",
|
||||
real_time_refresh=True,
|
||||
required=True,
|
||||
),
|
||||
MessageInput(
|
||||
name="message",
|
||||
|
||||
Reference in New Issue
Block a user