Not binding env variables
I have vectorize in wrangler.toml
[[vectorize]]
binding = "VECTORIZE_INDEX"
index_name = "supermem-vector-1"
but my env when i log it doesnt have vectorize_index. It is binding everything except vectorize. Not really sure how to debug this.
{ AI: Ai { fetcher: Fetcher {}, logs: [], options: {}, lastRequestId: null }, KV: KvNamespace {}, MY_QUEUE: WorkerQueue {} }
{ AI: Ai { fetcher: Fetcher {}, logs: [], options: {}, lastRequestId: null }, KV: KvNamespace {}, MY_QUEUE: WorkerQueue {} }
4 Replies
Can you share your entire wrangler.toml file?
The formatting in toml is a bit odd sometimes, so that might be causing issues
Please make sure you put three ``` before and after the text, so it's formatted properly
```
like this
```
Also thank you for that very quick reply
also it shows me that the binding is present but i am not able to use it in env
wrangler.toml changed...
Your worker has access to the following bindings:
- KV Namespaces:
- KV: c58b6202814f4224acea97627d0c18aa
- Queues:
- MY_QUEUE: batch-vector-queue
- Vectorize Indexes:
- VECTORIZE_INDEX: supermem-vector-1
- Browser:
- Name: MYBROWSER
- AI:
- Name: AI
Hmm that looks correct as far as I can see.
Are you running in local mode or remote mode? Local mode doesn't support vectorize
local mode
nooooo
but it should till show the value right?
actually yeh i am not using local flag. its remote