Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: Add tool mode to the prompt component #5113

Merged
merged 4 commits into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/backend/base/langflow/components/prompts/prompt.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from langflow.base.prompts.api_utils import process_prompt_template
from langflow.custom import Component
from langflow.inputs.inputs import DefaultPromptField
from langflow.io import Output, PromptInput
from langflow.io import MessageTextInput, Output, PromptInput
from langflow.schema.message import Message
from langflow.template.utils import update_template_values

Expand All @@ -15,6 +15,13 @@ class PromptComponent(Component):

inputs = [
PromptInput(name="template", display_name="Template"),
MessageTextInput(
name="tool_placeholder",
display_name="Tool Placeholder",
tool_mode=True,
advanced=True,
info="A placeholder input for tool mode.",
),
]

outputs = [
Expand Down
Loading