Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[BUG] Duplicate responses

Open mahmoudsorf opened this issue 1 year ago • 15 comments

Describe the bug when I use, conversational retrieval QA chain => chain Tool => Open AI function agent OR conversational retrieval QA chain => chain Tool => conversational retrieval agent

I am getting duplicate answers.

mahmoudsorf avatar Aug 21 '23 17:08 mahmoudsorf

have you tried RetrievalQAChain -> ChainTool -> Agent? Or try turning on Return Direct on ChainTool

HenryHengZJ avatar Aug 23 '23 23:08 HenryHengZJ

I notice the same, using: MultiRetrievalQAChain => ChainTool => Open AI function agent.

I think the agent action and the chain tool response are being streamed in the agent answer.

jrcapicua avatar Aug 24 '23 04:08 jrcapicua

Yes I tried the function agent as well and getting the same duplication.

mahmoudsorf avatar Aug 24 '23 05:08 mahmoudsorf

Same problem here, using OpenAi Function Agent.

SepuWeb avatar Sep 05 '23 20:09 SepuWeb

Seems to work fine on my side using RetrievalQAChain -> ChainTool -> OpenAI Function Agent: image

HenryHengZJ avatar Sep 06 '23 09:09 HenryHengZJ

Same error as well. It's happening, when having more than one chain tools as input for the agent.

segelmache avatar Oct 15 '23 19:10 segelmache

Same thing here

EgorZakharov97 avatar Nov 07 '23 17:11 EgorZakharov97

for now, a temporary workaroound is to enable Return Direct

HenryHengZJ avatar Mar 25 '24 11:03 HenryHengZJ

Unfortunately, this is a big issue for me as well. Would the fix likely be relatively straight forward, or more complicated?

Dakes avatar Apr 20 '24 16:04 Dakes

Same happening here, even with the Return Direct enabled:

What is happening is:

  • ChatOpenAI is called by MultiPromptChain, returns a json containing the selected prompt
    • This output json is streamed back to the user chat
  • ChatOpenAI is called a second time with the selected prompt
    • The answer is streamed back to the user chat as well

Something like this: Screenshot 2024-05-17 at 14 43 37

In the end, the final output is looking something like:

`json { "destination": "selected_prompt", "next_inputs": { "input": "prompt input" } }`Some answer to some question. 

I could send some screenshots, but all the text is mostly in Portuguese :/

mateusluizfb avatar May 17 '24 17:05 mateusluizfb

Same here. I get duplicate responses after the tool agent uses a custom tool

moymoussan avatar Jul 26 '24 18:07 moymoussan

I also get duplicate responses, but in two messages, where the message is completed.

Bildschirmfoto 2024-07-29 um 22 15 34

Bildschirmfoto 2024-07-29 um 22 14 44

io4x avatar Jul 29 '24 20:07 io4x

@io4x did u manage to solve it ?

Ghazalsalameh avatar Aug 04 '24 10:08 Ghazalsalameh

I noticed it happens on the embedded chat but not in the built in chat of the flow editor

moymoussan avatar Aug 04 '24 10:08 moymoussan

@Ghazalsalameh & @moymoussan - Aman soni was able to idenfity the fix. Resolve will come in the next few days!

https://discord.com/channels/1087698854775881778/1267529485893238935/1268953277400088626

io4x avatar Aug 04 '24 11:08 io4x

should be resolved with https://github.com/FlowiseAI/FlowiseChatEmbed/pull/221

HenryHengZJ avatar Aug 18 '24 21:08 HenryHengZJ