-
-
Notifications
You must be signed in to change notification settings - Fork 17k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to pass variables to System Prompt via an api call for Conversational Retrieval QA Chain or Tool Agent or Conversation Chain? #2991
Comments
Just added a PR for that #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: { Output: Jun 4 2024 2nd Turn Input Payload: { Output: Jun 4 2024 Also, does this work for Tool Agent? |
@vijaykammili in your case, you will need to turn off the cache: |
@HenryHengZJ - Thank you. I tried to turn off cache and I still have the same issue. |
@HenryHengZJ - Nope. It doesn't. I tested it with a conversation chain. |
@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: #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"
}
}
}
The text was updated successfully, but these errors were encountered: