Fix vectorstores/Redis to support output component "Chains" (#1292)
The previous version was missing output component "Chains". Before:  After: 
This commit is contained in:
commit
a6877033f8
1 changed files with 4 additions and 2 deletions
|
|
@ -1,6 +1,8 @@
|
|||
from typing import Optional
|
||||
from typing import Optional, List, Union
|
||||
from langflow import CustomComponent
|
||||
|
||||
from langchain.embeddings.base import Embeddings
|
||||
from langchain.schema import BaseRetriever
|
||||
from langchain.schema import Document
|
||||
from langchain_community.vectorstores import VectorStore
|
||||
from langchain_community.vectorstores.redis import Redis
|
||||
|
|
@ -42,7 +44,7 @@ class RedisComponent(CustomComponent):
|
|||
redis_server_url: str,
|
||||
redis_index_name: str,
|
||||
documents: Optional[Document] = None,
|
||||
) -> VectorStore:
|
||||
) -> Union[VectorStore, BaseRetriever]:
|
||||
"""
|
||||
Builds the Vector Store or BaseRetriever object.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue