FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
31.71k stars 16.55k forks source link

[BUG]The same question yields different answers in the API and the UI #3515

Open tzengshinfu opened 1 week ago

tzengshinfu commented 1 week ago

Describe the question The same question yields different answers in the API and the UI.

To Reproduce Steps to reproduce the behavior:

The UI Question (as shown in the blue box below) Answer (as shown in the green box below) ui

The API Question (as shown in the blue box below) Answer (as shown in the red box below) api

Expected behavior The answers obtained from the API and the UI should be the same.

Setup

HenryHengZJ commented 5 days ago

is this happening every time? how can I replicate this

tzengshinfu commented 5 days ago

Hi, HenryHengZJ: It might be challenging to reproduce, as I'm using Ollama Embeddings (Local Ollama) + ChatOllama (Local Ollama) + Postgres Vector Store + Conversational Retrieval QA Chain. image_20241117_102543

However, I've observed that the API endpoint used in the UI part is different from the one used when calling the API directly. image_20241117_095554

The payload parameters are also different. image_20241117_095605

And in the UI part, only the Streaming Response provides the correct answer. image_20241117_101750

The answer obtained by directly using the API is incorrect. image_20241117_102857 image_20241117_103750

tzengshinfu commented 1 day ago

I followed the suggestion to pass the sessionId, but the results are still different. (The user will only ask questions to Flowise through a third-party webhook, but the API's answers should match those of the UI.) image_20241121_150809