refactor: Update PromptComponent inputs to use PromptInput

Update the inputs of the PromptComponent class in Prompt.py to use the PromptInput class instead of the deprecated Input class. This change improves the organization and separation of concerns in the codebase, making it easier to understand and maintain.
This commit is contained in:
ogabrielluiz 2024-06-12 16:16:00 -03:00
commit 3ac8bf99eb

View file

@ -1,6 +1,7 @@
from langflow.custom import Component
from langflow.field_typing import Input, Output
from langflow.field_typing.prompt import Prompt
from langflow.inputs import PromptInput
from langflow.template import Output
class PromptComponent(Component):
@ -9,7 +10,7 @@ class PromptComponent(Component):
icon = "prompts"
inputs = [
Input(name="template", field_type=Prompt, display_name="Template"),
PromptInput(name="template", display_name="Template"),
]
outputs = [