Skip to content

Error upserting docs into Chroma - metadata error #5545

@kylediaz

Description

@kylediaz

Describe the bug

Hi,

When I try to upsert document chunks from a PDF to Chroma, I get an error.

It's likely because Flowise is trying to insert metadata values that are objects into Chroma. Chroma only supports strings, numbers, and booleans as metadata values.

@HenryHengZJ I think you're the guy to ask. Can we work together to fix this?

To Reproduce

  1. Create Chroma API credentials for Chroma Cloud
  2. Create a new document store
  3. Add a PDF to the document store
  4. Observe that the document has metadata with an object in it. I logged this:
flowise:dev: mappedMetadatas [{"source":"blob","blobType":"","pdf":{"version":"1.10.100","info":{"PDFFormatVersion":"1.4","IsAcroFormPresent":false,"IsXFAPresent":false,"Creator":"","Producer":"","CreationDate":"D:20250827180845+00'00'","ModDate":"D:20250827180845+00'00'"},"metadata":null,"totalPages":1},"docId":"a2f4cf39-2bca-425a-92b3-ce44f9e9e03d"}]

I can also see here a value is an object.
Image
5. Click "upsert chunks"
6.

Image 7. Click "Upsert" Image
Status: 500
Error: documentStoreServices.insertIntoVectorStoreMiddleware - Error: documentStoreServices.insertIntoVectorStore - Error: documentStoreServices._insertIntoVectorStoreWorkerThread - ChromaValueError: Expected metadata to be a string, number, boolean, SparseVector, or nullable

Expected behavior

It successfully upserts the docs

Screenshots

No response

Flow

No response

Use Method

None

Flowise Version

Current head 6fb97ce

Operating System

macOS

Browser

Chrome

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions