FlowiseAI / Flowise

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

[BUG] Can't override data for sequential agents #3240

Open muditguptacode opened 3 days ago

muditguptacode commented 3 days ago

Describe the bug When using the API to override parameters in sequential agents or LLM nodes, the ability to specify multiple values for a config parameter by specifying the node ids does not seem to work correctly.

Example:

This overrideConfig works correctly:

 overrideConfig: {
      sessionId:  '<some session id>',
      systemMessagePrompt: 'you are cat, you can only response with meows',
      qdrantCollection: {
        qdrant_2: 'vectorCollectionName'
      }
    }

BUT this one causes an error: (Error: predictionsServices.buildChatflow - Error buildAgentGraph - message.content.map is not a function)

 overrideConfig: {
      sessionId: '<some session id>',
      systemMessagePrompt: {
          seqAgent_0: 'you are cat, you can only response with meows'
     },
      qdrantCollection: {
        qdrant_2: 'vectorCollectionName'
      }
}

To Reproduce Steps to reproduce the behavior:

  1. Create a flow using sequential agents or LLM nodes
  2. Try providing override config values by specifying node id

Expected behavior The flow should accept the override values and return the prediction result

HenryHengZJ commented 1 day ago

Do you have a example flow?

I tried testing and it works as expected:

1.) Has an agentflow with 2 agents: image

2.) Test via Postman (override system prompt for agent_2): image

3.) Verify on langsmith: image