I am noticing a large number of `AiError: 3001: Unknown internal error` s when doing some Vectorize
I am noticing a large number of
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 control15 Replies
I've been browsing through messages in the past and documentations on vectorize, looks like now it's a great time to jump in, considering the beta release of workflow as well. though my concern is full RAG pipeline still needs a long way to go, so I'd prefer develop locally using llamaindex+chromadb(or equivalent)+litellm(embedding, inference, rerank, whisper, etc) first, before switching to cloudflare edge side completely, which I do need at a certain point because the product I am building requires global coverage.
may I ask guy who already had previous experiences here, that, is this a viable plan, or anything I should keep in mind for choosing tech stack or develop or doing gitops? thanks a million!
Hi, is Cloudflare Vectorize now support $in metadata filter ?
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
How can I see what vectors I have in my index? I checked the commands I could run, and none mentioned showing the vectors I got in my index. I want to be able to delete and test stuff before I run the actual thing. Any guidance would be appreciated.
Unknown User•5w ago
Message Not Public
Sign In & Join Server To View
Hello, Quick question, I get really slow response times in Vectorise. Like seconds of response time. My code is very simple, so nothing else should be slowing it down. I am in Greece btw, so not sure if that plays a role. I get the same speeds when deploying the worker.
@Kingsley Michael I removed your message as this is the channel for #vectorize, please use #off-topic for anything unrelated to Cloudflare products
The limits page says that there's a maximum of 5,000,000 vectors per index, but I'm getting a 4002 error when attempting to upsert past 240,000. any idea why or things I should change?
EDIT: RESOLVED, I was using V1 instead of V2
TypeError: vectors.map is not a function
What does this mean when it's triggered from this:
await vectorIndex.insert({
id: String(data[0][dataId]),
values: vectorArray,
metadata
});
EDIT:
I tested it on a small function:
I got the same error: vectors.map is not a function...
@yevgen Any help would be appreciated, we're a high tier client and we want to implement vectorize over our app. But we're facing vectors.map is not a function on simple calls as well.
Does this happen just locally or also when deployed?
Both
This wasn't an issue before, it suddenly became an issue. I also created a fresh new worker and the issue still happened.
Hi @CedricHadjian. Thanks for reaching out! I was able to tweak the code you have shared a bit and was able to get it to work. This is a codeblock that works as expected.
Summary of the fixes:
1. I enclosed the object being passed to the Vectorize insert operation in square brackets. This is needed because the insert function requires the input to be of an Array type.
2. I converted the id from 1 to '1'. This is needed because Vectorize vector identifiers need to be of a String type.
Feel free to reach out if you need additional support for Vectorize!
Thank you so much, I spent 6 hours trying to figure out what the issue is and it turns out to be the brackets, I also remember trying stringifying the id but it still never worked.
Happens to the best of us, I am glad we could help you out with this! Something that helps us when we develop Worker code is to setup the Worker locally as an npm project. Then you can load the project into your preferred IDE which would almost certainly display relevant packages and method signatures from
node_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.Cloudflare Docs
Vectorize and Workers AI · Vectorize
Vectorize allows you to generate vector embeddings using a machine-learning model, including the models available in Workers AI.
Thank you, I had it working on another test worker that I was playing around with and when it came to production, I got stuck at this because I didn't notice the brackets