Closed vijaykammili closed 1 week ago
Just added a PR for that https://github.com/FlowiseAI/Flowise/pull/2986
Fantastic! Thanks a lot, @HenryHengZJ
@HenryHengZJ: This works when you send the variables for the 1st turn but doesn't work for the subsequent turns.
Here is an example:
1st Turn:
Input Payload:
{ "question": "Hello", "overrideConfig": { "sessionId": "88880", "vars" : { "date": "Jun 4 2024" } } }
Output: Jun 4 2024
2nd Turn
Input Payload:
{ "question": "Hello", "overrideConfig": { "sessionId": "88880", "vars" : { "date": "Jun 5 2024" } } }
Output: Jun 4 2024
Also, does this work for Tool Agent?
@vijaykammili in your case, you will need to turn off the cache: DISABLE_CHATFLOW_REUSE
https://docs.flowiseai.com/configuration/environment-variables
@HenryHengZJ - Thank you. I tried to turn off cache and I still have the same issue.
does it work if you try a simple conversation chain?
@HenryHengZJ - Nope. It doesn't. I tested it with a conversation chain.
Same problem here, I can't pass a variable through the API. I tried type static and runtime, but the value doesn't change.
Im not sure why but it works for me.
1.) 1st request:
2.) 2nd request:
using a simple flow:
@HenryHengZJ - I tested this again today on version 2.0.7 for Conversation Chain, Tool agent and Conversational Retrieval QA Chain and this is working as expected. Not sure what changed but glad it's working. Thank you.
@HenryHengZJ - I've done some additional testing. Is there a limit to the number of variables you can pass via the API? some of the variables don't get passed, it's very inconsistent. Tested with Simple Conversation Chain, Tool Agent and Conv QA Retrieval Chain.
@vijaykammili good spot! put up a bugfix here: https://github.com/FlowiseAI/Flowise/pull/3129
@HenryHengZJ How can i pass variables to the System Prompt via the API?
I know the following works for nodes that have promptValues defined like Chat Prompt Template. Is there something like this for Conversational Retrieval QA Chain or Tool Agent or Conversation Chain? Trying to find a way so I don't have to override the whole system prompt and just pass the variables necessary.
{"question": "Hi", "overrideConfig": { "promptValues": { "input_language": "French", "output_language": "Italian" } } }