Hey guys, I'm try to insert a vector via REST API, but I'm getting ```json { "result": null, "
Hey guys, I'm try to insert a vector via REST API, but I'm getting
I'm creating a blob to simulate as a file and send it via formdata
Am I doing something wrong? Any ideas?
13 Replies
Bad Request / Internal Server Error
returns correctly list of indexes.
unfortunately upsert is returning 400 Bad Request
path to ndjson file is correct. there is only a single 768 vector.
I am getting the same results with curl. curl response differs slightly:
My best guess that something might be wrong with ndjson format
Unknown Userâ˘8mo ago
Message Not Public
Sign In & Join Server To View
Same response.
Let me know if I can provide further details.
Unknown Userâ˘8mo ago
Message Not Public
Sign In & Join Server To View
same. let me try to insert that vector using wrangler. just to be sure that the file is in the correct format.
@cfnathan Okay, it appears that file format is wrong.
How it should it be formatted?
@cfnathan validator says OK
Unknown Userâ˘8mo ago
Message Not Public
Sign In & Join Server To View
perfect! that's it. wrangler works as well as multipart request. however, the first example is still returning 400. you might have a bug there. i will review the code in quesion once again. đ
curl is giving the same error.
Hi, Cloudflare team
I encountered a 502 error when accessing the Vectorize Query API using a Singapore IP, but it works fine with a China IP. How can I resolve this?
This is the API being used.
const url =
https://api.cloudflare.com/client/v4/accounts/${ACCOUNT_IDENTIFIER}/vectorize/indexes/${indexName}/query
;Unknown Userâ˘8mo ago
Message Not Public
Sign In & Join Server To View
Does anyone know where I can find OpenAPI spec files for vectorize db?
https://developers.cloudflare.com/api/operations/vectorize-list-vectorize-indexes
if you go back to https://developers.cloudflare.com/api/ you can export the whole cloudflare openapi spec, if you need that
All the examples show populating a
wrangler.toml
with:
and then they show using it in a worker script.
Do I have to declare the index in the toml file? What I would instead like to do is dynamically create indexes and let the client specify which one it wants to use (or create) in the request. That way each user can have their own index of whatever.
I know I can create indexes using the REST API. However, idk how to then dynamically load them by name in a worker to use them for search.Unknown Userâ˘8mo ago
Message Not Public
Sign In & Join Server To View