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:
parent
8511c2ebad
commit
3ac8bf99eb
1 changed files with 3 additions and 2 deletions
|
|
@ -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 = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue