Remove unused code in PromptComponent
This commit is contained in:
parent
d413b2b6fc
commit
87f3330ab5
1 changed files with 0 additions and 4 deletions
|
|
@ -1,7 +1,6 @@
|
|||
from langchain_core.prompts import PromptTemplate
|
||||
from langflow import CustomComponent
|
||||
from langflow.field_typing import Prompt, TemplateField, Text
|
||||
from langflow.schema import Record
|
||||
|
||||
|
||||
class PromptComponent(CustomComponent):
|
||||
|
|
@ -22,9 +21,6 @@ class PromptComponent(CustomComponent):
|
|||
) -> Text:
|
||||
prompt_template = PromptTemplate.from_template(template)
|
||||
|
||||
for key, value in kwargs.copy().items():
|
||||
if isinstance(value, Record):
|
||||
kwargs[key] = value.text
|
||||
try:
|
||||
formated_prompt = prompt_template.format(**kwargs)
|
||||
except Exception as exc:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue