
--deprecated-v1 flag on certain calls. I just created the index today so I'm very happy to use V2 but don't want to roll my own client.npm i cloudflare. There are 93 other projects in the npm registry using cloudflare.
For the metadata filtering, is it ok to do {"attribute":{"$ne", null} } ?Yes
another question is that any upsert support that only updates the metadata based on id ? Whats the recommended way to update metadata?It's on a roadmap to provide

null like that?"null", not actual null.nullnamespace mainly delete use-case would be very helpful - in my case I have namespace for every "project" and I would like an easy way to clean-up.AiError: 3001: Unknown internal error s when doing some Vectorize queries. Is there any way to get more insight into what these are? I have no clue if it's not finding a vector by ID, if I'm getting rate limited, or if it's something I can't control$in and $nin metadata filtersnode_modules. This project code can also be pushed to your preferred Version Control System if it is a collaborative project. You can refer to https://developers.cloudflare.com/vectorize/get-started/embeddings/ for an example on setting up the project from scratch.
$in$nin if (request.method === 'GET' && pathname === `/embed`) {
try {
const text = "Liam Marshall"
const response = await env.AI.run("@cf/baai/bge-small-en-v1.5", {
text,
});
await env.TESTVECTORS.insert({
id: 1,
values: response.data[0],
metadata: {
key: "value"
}
})
return new Response(JSON.stringify(response), {
headers: {
'content-type': 'text/plain;charset=UTF-8',
'Access-Control-Allow-Origin': '*',
},
});
} catch (error) {
console.log(error);
}
} try {
const text = 'Liam Marshall';
const ai_response = await env.AI.run('@cf/baai/bge-small-en-v1.5', {
text,
});
const vectorize_response = await env.TESTVECTORS.insert([
{
id: '1',
values: ai_response.data[0],
metadata: {
key: 'value',
},
},
]);
return new Response(JSON.stringify(vectorize_response), {
headers: {
'content-type': 'text/plain;charset=UTF-8',
'Access-Control-Allow-Origin': '*',
},
});
} catch (error) {
console.log(error);
} }),
async (c) => {
const text = "XXX";
const e = await embedText(c, text);
const r = await c.env.VECTORIZE.query(e, {
topK: 5,
returnValues: false,
returnMetadata: "none",
});
return c.json({ matches: r.matches });
}
);