https://promptfoo.dev/ logo
Random variable
# ❓|questions
r
When calling our agent we have a random number as a thread id (for state management). Is it possible to generate these through promptfoo so that we don't get collisions when running multiple calls simultaneously? I don't want to re-use ids as I want each test to be clean.
u
Yes it is. You can follow the instructions here to generate a unique UUID on ever test https://www.promptfoo.dev/docs/providers/http/#client-side-session-management defaultTest: options: transformVars: '{ ...vars, sessionId: context.uuid }'
r
Thank you, I had missed that
2 Views