Исходный код: < /p>
Код: Выделить всё
app.get('/cleanUpResources', async (req, res) => {
const _id = req.query.email;
const embeddings = new VertexAIEmbeddings({
model: "text-embedding-004",
});
const vectorStore = await QdrantVectorStore.fromExistingCollection(embeddings, {
url: ,
apiKey: ,
collectionName: 'pdf-docs',
});
// Delete all points with payload field 'id' equal to req.body.email
await vectorStore.delete({
filter: {
must: [
{
key: "id",
match: { value: JSON.stringify(_id) },
},
],
},
});
return res.json({ message: `Deleted all points with id: ${id}` });
})
< /code>
ошибка: < /p>
Error: Bad Request
at Object.fun [as deletePoints] (file:///C:/Users/abhis/OneDrive/Desktop/PROJECTS/PDF-RAG/server/node_modules/@qdrant/openapi-typescript-fetch/dist/esm/fetcher.js:169:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async QdrantClient.delete (file:///C:/Users/abhis/OneDrive/Desktop/PROJECTS/PDF-RAG/server/node_modules/@qdrant/js-client-rest/dist/esm/qdrant-client.js:628:26)
at async QdrantVectorStore.delete (file:///C:/Users/abhis/OneDrive/Desktop/PROJECTS/PDF-RAG/server/node_modules/@langchain/qdrant/dist/vectorstores.js:140:13)
at async file:///C:/Users/abhis/OneDrive/Desktop/PROJECTS/PDF-RAG/server/app.js:73:5
< /code>
Qdrant DB Структура коллекции: < /p>
metadata: {
"source":"uploads\1753380027445-401326695-CT20244465298_Appl…"
"pdf":{}
"loc":{}
"id":""
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... -qdrant-db