https://promptfoo.dev/ logo
latency management
# ❓|questions
m
I am using the python provider and I am running some script before doing the proper query to the LLM. if would like the time of this script not to be in the Latency calculation. The strategy that i tried was to move it in the beforeEach/beforeAll hooks but it still looks that i have the same latencies in the output. do you have an idea if this make sense? should i use some other way to do it? thanks in advance peace, Marco
m
You should be able to calculate the latency on your own and return it as part of the provider response as
latencyMs?: number;
I'll QA this and update the python docs for you.
See src/types/providers.ts:137
m
thank you 🙂