https://promptfoo.dev/ logo
How can I access the current provider in a dynamic...
# ❓|questions
m
I am trying to compare two Azure Prompt flows. I have the two Prompt flows as two different providers and if I fetch the context dynamically I want to use the retrieval logic of the relevant provider. Is this possible? I would like to use metrics like context recall, that's why I need to fetch the context dynamically. Thanks in advance.
i
How is your context script implemented? I believe the
ApiProvider
instance is passed as a param if you're using JS
m
Sorry I forgot to mention, I am using Python. I know how you can get the config of the provider in the call_api function (through the options argument). But I don't know how to do it in the get_var function used to dynamically load the context (as there is no options argument).