https://promptfoo.dev/ logo
how to use Providers with Azure open ai
# ❓|questions
s
I have following yml for rag testing: prompts: ['{{ query }}'] providers: ['exec: python retrieve.py'] - id: azureopenai:chat:myai-gpt-35-turbo-16k config: apiHost: apiKey: tests: - vars: topic: bananas - vars: topic: avocado toast assert: - type: icontains value: avocado - type: javascript value: 1 / (output.length + 1) # prefer shorter outputs - vars: topic: new york city assert: - type: icontains value: New York City when I run getting this error YAMLException: bad indentation of a mapping entry (8:3) 5 | - "Write a very concise, funny t ... 6 | 7 | providers: ['exec: python retrieve ... 8 | - id: azureopenai:chat:genai-gpt ... -------^ 9 | config: Question, do we need config here?
I think, I dont need Config? because in My RAG , I am using all details
i
yeah if the RAG does all the querying, you can just use retrieve.py as the provider
s
Also I am using a chain that uses the retriever that searches over our document index. if possible can you provide more details around this , can we use chain ? In my case chain = ( {"context": retriever, "question": RunnablePassthrough()} | prompt | ml.llm | StrOutputParser() )
never mind , I was able to figure out , thank you 🙂