feat: Add tool mode to the prompt component (#5113)
* Add tool mode to the prompt component * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
This commit is contained in:
parent
6d83bc13b4
commit
121b7c6e39
1 changed files with 8 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
from langflow.base.prompts.api_utils import process_prompt_template
|
from langflow.base.prompts.api_utils import process_prompt_template
|
||||||
from langflow.custom import Component
|
from langflow.custom import Component
|
||||||
from langflow.inputs.inputs import DefaultPromptField
|
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.schema.message import Message
|
||||||
from langflow.template.utils import update_template_values
|
from langflow.template.utils import update_template_values
|
||||||
|
|
||||||
|
|
@ -15,6 +15,13 @@ class PromptComponent(Component):
|
||||||
|
|
||||||
inputs = [
|
inputs = [
|
||||||
PromptInput(name="template", display_name="Template"),
|
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 = [
|
outputs = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue