From 23a141cb8d950be45aa8344173bf593c10c3fbfe Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 6 Nov 2023 13:13:21 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix(LLMChain.py):=20add=20missin?= =?UTF-8?q?g=20import=20for=20Text=20type=20from=20langflow.field=5Ftyping?= =?UTF-8?q?=20module=20=F0=9F=9A=80=20feat(LLMChain.py):=20update=20return?= =?UTF-8?q?=20type=20annotation=20of=20LLMChainComponent.=5F=5Fcall=5F=5F?= =?UTF-8?q?=20method=20to=20include=20Text=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/components/chains/LLMChain.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/components/chains/LLMChain.py b/src/backend/langflow/components/chains/LLMChain.py index b14eef302..e7cd68acb 100644 --- a/src/backend/langflow/components/chains/LLMChain.py +++ b/src/backend/langflow/components/chains/LLMChain.py @@ -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)