Skip to content

Bad Zod validation schema in Vectorize query function #350

@V1laZ

Description

@V1laZ

Describe the bug
When calling the vectorize query function without the second 'params' argument it throws a Zod validation error.

Steps to reproduce

  1. Call hubVectorize('<index>').query([32.4, 6.55, 11.2, 10.3, 87.9])

Expected behavior
There's probably a missing .optional() method at the end of the params schema definition in Vectorize's query command. According to the docs it should be possible to call the function without the second argument.

Workaround
hubVectorize('<index>').query([32.4, 6.55, 11.2, 10.3, 87.9], {})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions