langchain
langchain copied to clipboard
feat(module): add param ids to ElasticVectorSearch.from_texts method
add param ids to ElasticVectorSearch.from_texts method.
- Description: add param ids to ElasticVectorSearch.from_texts method.
- Issue: NA. It seems
add_texts
already supports passing in document ids, but paramids
is omitted infrom_texts
classmethod, - Dependencies: None,
- Tag maintainer: @rlancemartin, @eyurtsev please have a look, thanks
# ElasticVectorSearch add_texts
def add_texts(
self,
texts: Iterable[str],
metadatas: Optional[List[dict]] = None,
refresh_indices: bool = True,
ids: Optional[List[str]] = None,
**kwargs: Any,
) -> List[str]:
...
# ElasticVectorSearch from_texts
@classmethod
def from_texts(
cls,
texts: List[str],
embedding: Embeddings,
metadatas: Optional[List[dict]] = None,
elasticsearch_url: Optional[str] = None,
index_name: Optional[str] = None,
refresh_indices: bool = True,
**kwargs: Any,
) -> ElasticVectorSearch:
# FAISS from_texts
@classmethod
def from_texts(
cls,
texts: List[str],
embedding: Embeddings,
metadatas: Optional[List[dict]] = None,
ids: Optional[List[str]] = None, # ids support <--
**kwargs: Any,
) -> FAISS:
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
langchain | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 9, 2023 9:25am |
thanks @charosen!