🔧 fix(LLMChain.py): add missing import for Text type from langflow.field_typing module

🚀 feat(LLMChain.py): update return type annotation of LLMChainComponent.__call__ method to include Text type
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-11-06 13:13:21 -03:00
commit 23a141cb8d

View file

@ -6,6 +6,7 @@ from langflow.field_typing import (
BaseLanguageModel,
BaseMemory,
Chain,
Text,
)
@ -26,5 +27,5 @@ class LLMChainComponent(CustomComponent):
prompt: BasePromptTemplate,
llm: BaseLanguageModel,
memory: Optional[BaseMemory] = None,
) -> Union[Chain, Callable]:
) -> Union[Chain, Callable, Text]:
return LLMChain(prompt=prompt, llm=llm, memory=memory)