pinecone-ts-client icon indicating copy to clipboard operation
pinecone-ts-client copied to clipboard

[Bug] Metadata filters not being applied in Assistant listFiles function

Open pwetherbee opened this issue 8 months ago • 2 comments

Is this a new bug?

  • [x] I believe this is a new bug
  • [x] I have searched the existing Github issues and Community Forum, and I could not find an existing post for this bug

Describe the bug Filtering file results by metadata does not apply filter and instead returns all files in the assistant.

Error information No errors, just unexpectedly receiving all files instead of the filtered list.

Steps to reproduce the issue locally

const pc = new Pinecone();
const assistant = pc.Assistant(assistantName);

 const files = await assistant.listFiles({
    filter: {
      metadata: {
        version: "v1",
      },
    },
  });

console.log(files.files) // returns files with metadata: {"version": "v2"}

Environment

  • OS and version: Windows (WSL)
  • Node version: 18
  • Typescript SDK version: 5

Additional context I have tried to bypass this bug by using the curl example, but it appears to be a GET request with a -d request body, which throws errors in node.

pwetherbee avatar Mar 08 '25 01:03 pwetherbee

Same issue here, any updates?

scarter93 avatar Mar 26 '25 20:03 scarter93

On the assistant chat side, I got it to work using the $eq filter key

pwetherbee avatar Mar 27 '25 07:03 pwetherbee