Skip to content

Commit

Permalink
fix: respect table_name argument when calling from_texts
Browse files Browse the repository at this point in the history
valid for from_documents() as well

fixes langchain-ai#21251
  • Loading branch information
jaceksan committed May 3, 2024
1 parent 70bde15 commit 6a0b279
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/community/langchain_community/vectorstores/lancedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ def from_texts(
vector_key: Optional[str] = "vector",
id_key: Optional[str] = "id",
text_key: Optional[str] = "text",
table_name: Optional[str] = "vectorstore",
**kwargs: Any,
) -> LanceDB:
instance = LanceDB(
Expand All @@ -267,6 +268,7 @@ def from_texts(
vector_key=vector_key,
id_key=id_key,
text_key=text_key,
table_name=table_name,
)
instance.add_texts(texts, metadatas=metadatas, **kwargs)

Expand Down

0 comments on commit 6a0b279

Please sign in to comment.