Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[BUG] Flowise → Zep (0.27.x) integration fails: "cannot unmarshal string into Go struct field …embedding_dimensions of type int"

Open simfor99 opened this issue 1 year ago • 5 comments

Describe the bug When Flowise attempts to create or insert into a Document Collection in Zep 0.27.x, it sends the embedding_dimensions field as a string (e.g. "384") instead of an integer. Zep expects an integer and returns a 400 error:

json: cannot unmarshal string into Go struct field CreateDocumentCollectionRequest.embedding_dimensions of type int

This causes Flowise to throw a 500 error on the Flowise side:

APIError: Got an unexpected status code: 400 Response: "cannot unmarshal string into Go struct..."

To Reproduce Steps to reproduce the behavior:

  1. Set up Flowise (version 2.2.3) in Docker on Windows.

  2. Configure a Document Store or Vector Store node pointing to Zep (version 0.27.x).

  3. Fill in "Embedding Dimensions" in Flowise (e.g. 384 or 768).

  4. Attempt to "Upsert" or "Insert" documents into that Vector Store in Flowise.

  5. Flowise fails with a 500 error. In Flowise logs:

    Error initializing collection: APIError: Got an unexpected status code: 400 ... responseData: 'json: cannot unmarshal string into Go struct field ...embedding_dimensions of type int'

  6. Zep logs show a 400 Bad Request with a message about "cannot unmarshal string for embedding_dimensions".

Expected behavior

  • When Flowise uses "Embedding Dimensions," it should send the field as an integer (e.g. embedding_dimensions: 384) rather than a string ("384").
  • Zep would successfully create or update the collection without a 400 error.

Setup

  • Installation method: Docker
  • Flowise Version: 2.2.3
  • Zep Version: 0.27.2
  • OS: Windows 10 64-bit
  • Browser: Chrome (for Flowise UI)

Additional context

  • Zep 0.27.x expects embedding_dimensions as an integer. If Flowise sends "384" (string), Zep returns a 400 Bad Request.
  • This might require Flowise to ensure it passes an integer field to Zep for embedding_dimensions.
  • Possibly related to other "cannot unmarshal string into Go struct" issues in Flowise for different backends. Clipboard_01-03-2025_01 ID_250103_232814 ID_250103_232820 ID_250103_232829

simfor99 avatar Jan 03 '25 22:01 simfor99

Same problem for a simple AI Agent using ChatOllama image image Running inside docker on a MacOS m4 Flowise Version: 2.2.3

n0one42 avatar Jan 05 '25 09:01 n0one42

I was facing the same issue, but then I update my Ollama and the error went away, can you try that?

HenryHengZJ avatar Jan 09 '25 00:01 HenryHengZJ

Dear Henry - I will look into it early next week, and report back - thanks for suggesting this approach.

simfor99 avatar Jan 09 '25 08:01 simfor99

@HenryHengZJ I updated Ollama as described, then re-installed zep, however I still face this error message:

Status: 500 Error: documentStoreServices.insertIntoVectorStore - Error: documentStoreServices._insertIntoVectorStoreWorkerThread - APIError: Got an unexpected status code: 400

simfor99 avatar Jan 19 '25 11:01 simfor99

however from my end, I found a replacement that works - Qdrant vector store, I will discontinue using ZEP for my projects

simfor99 avatar Jan 19 '25 11:01 simfor99