Replies: 2 comments 6 replies
-
🤖 The This is evident in the async addModels(models: TModel[]) {
return this.addDocuments(
models.map((metadata) => {
const pageContent = metadata[this.contentColumn];
if (typeof pageContent !== "string")
throw new Error("Content column must be a string");
return new Document({ pageContent, metadata });
})
);
} And also in the const results: [Document<SimilarityModel<TModel, TSelectModel>>, number][] =
[];
for (const article of articles) {
if (article._distance != null && article[this.contentColumn] != null) {
results.push([
new Document({
pageContent: article[this.contentColumn] as string,
metadata: article,
}),
article._distance,
]);
}
} In both cases, the The This was also discussed in a similar issue [Prisma] Is there a reason why I hope this answers your question. If you have any more questions or need further clarification, feel free to ask. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
cc/ @nfcampos @dqbd who seem to have worked on this previously. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a reason why
metadata
includescontentColumn
(pageContent
), in the Prisma vectorstore?langchainjs/langchain/src/vectorstores/prisma.ts
Lines 394 to 397 in 4dbe79f
Beta Was this translation helpful? Give feedback.
All reactions