cloudflare / workerd

The JavaScript / Wasm runtime that powers Cloudflare Workers

Home Page:https://blog.cloudflare.com/workerd-open-source-workers-runtime/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong typings for VectorizeMatch

anderseklof opened this issue · comments

For the Vectorize query response, the VectorizeMatch type has the following structure:

{
  id: string
  values?: VectorFloatArray | number[]
  namespace?: string
  metadata?: Record<string, VectorizeVectorMetadata>
  score: number
}

But in my response i get:

{
  vectorId: string
  score: number
  vector: {
    id: string
    namespace: string
    values: number[]
    metadata: {
      ...
    }
  }
}

The type has been that of my response but got changed in PR #1297. What am i missing?

I needed to update the compatibility_date in wrangler.toml.