[BUG] syntaxerror: Unexpected token 'F', Failed is not valid JSON
Describe the bug Thank you so much for this very inspired resource!
I am encountering the following error with the flow below:
SyntaxError: Unexpected token 'F', "Failed to "... is not valid JSON at JSON.parse (
) at parseJSONFromBytes (node:internal/deps/undici/undici:6613:19) at successSteps (node:internal/deps/undici/undici:6587:27) at node:internal/deps/undici/undici:1236:60 at node:internal/process/task_queues:140:7 at AsyncResource.runInAsyncScope (node:async_hooks:206:9) at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { attemptNumber: 7, retriesLeft: 0 }
To Reproduce Steps to reproduce the behavior:
- Copy Conversational Retrieval QA Chain flow from Marketplace
- Replace Text File component with PDF File component
- Replace OpenAI components with HuggingFace component
- Enter API Keys
- Save flow
- Select PDF
- Enter Prompt in Chat panel
Expected behavior A clear and concise description of what you expected to happen.
Expected the flow to execute allowing inspection of PDF file entries.
Screenshots If applicable, add screenshots to help explain your problem.
Flow If applicable, add exported flow in order to help replicating the problem. PDF-Explorer Chatflow.zip
Setup
- Installation:
npx flowise start - Flowise Version: 1.2.11
- OS: macOS (Sonoma)
- Browser: Arc/chrome
Additional context Add any other context about the problem here.
hey @simsherpa do you face same problem when using ChatOpenAI and OpenAIEmbedding nodes?
Hi @HenryHengZJ, thanks for the follow-up. I'm exploring strictly open source LLMs -- so I do not have an OpenAI account and therefore have not tried those OpenAI components. Any other suggestions?
hey @simsherpa do you face same problem when using ChatOpenAI and OpenAIEmbedding nodes?
Hey, @HenryHengZJ, it was functioning properly when utilizing the ChatOpenAI and OpenAIEmbedding nodes. However, we are currently seeking an open-source language model like LLM-Falcon. Could you please investigate this matter?
I have this same problem in two different flows. Both uing ChatOpenAi. The common characteristic is that it is a LLM Chain feeding an OutPut prediction into an Prompt Template, and the LLM Chain outputs predictions that contains "
Seems like the " character is not being escaped, and thus it is breaking the json.
good news we have a PR addressing this issue - https://github.com/FlowiseAI/Flowise/pull/558
Update: The former PR got closed, now on #612