Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/slow-clouds-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@langchain/weaviate": patch
---

Make flattenObjectForWeaviate more resilient
22 changes: 22 additions & 0 deletions libs/langchain-weaviate/src/tests/vectorstores.int.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,28 @@ test("WeaviateStore with limited metadatakeys", async () => {
}
});

test("invalid metadata name", async () => {
const weaviateArgs = {
client,
indexName: "TestInvalidMetadataKeys",
textKey: "text",
};
await WeaviateStore.fromTexts(
["hello world"],
[{ "pdf_metadata__metadata_xmp:createdate": "bar" }],
new FakeEmbeddings(),
weaviateArgs
);
try {
const total = await client.collections
.get(weaviateArgs.indexName)
.aggregate.overAll();
expect(total.totalCount).toEqual(1);
} finally {
await client.collections.delete(weaviateArgs.indexName);
}
});

test("WeaviateStore delete with filter", async () => {
const weaviateArgs = {
client,
Expand Down
Loading