Repository: promptfoo/promptfoo
Issue: model-graded-factuality and model-graded-closedqa asserts using AzureOpenAI
Root cause: Configuration Error

Hi @typpo  thanks a lot for your response... (https://github.com/promptfoo/promptfoo/issues/369)
I have tried to  override the LLM grader but i am still getting error, Here you have my yaml

```
prompts: [prompt1.txt, prompt2.txt]
providers:
  - id: azureopenai:chat:gpt4
    config:
      apiHost: testinstance.openai.azure.com
      temperature: 0
      max_tokens: 50
      apiKey: XXXXXXXXXXX
evaluateOptions: { cache: false }
defaultTest:
  options:
    provider:
      id: azureopenai:chat:gpt4
      config:
        apiHost: testinstance.openai.azure.com
        apiKey: XXXXXXXXXXXXXXXXXX
  assert:
    - type: javascript
      value: Math.max(0, Math.min(1, 1 - (output.length - 100) / 900))
tests:
  - vars:
      query: What is the max purchase that doesn't require approval?
      context: file://docs/reimbursement.md
    assert:
      - type: contains
        value: '$500'
      - type: factuality
        value: the employee's manager is responsible for approvals
      - type: answer-relevance
        threshold: 0.8
      - type: context-recall
        threshold: 0.9
        value: Employees must submit their expense reports by the first business day of the month
      - type: context-relevance
        threshold: 0.9
      - type: context-faithfulness
        threshold: 0.9
  - vars:
      query: How many weeks is maternity leave?
      context: file://docs/maternity.md
    assert:
      - type: factuality
        value: maternity leave is 4 months
      - type: answer-relevance
        threshold: 0.8
      - type: similar
        value: eligible employees can take up to 4 months of leave
```

ERROR:
![image](https://github.com/promptfoo/promptfoo/assets/6631983/9d6efa4a-a312-475e-be4e-a0f8a7d89e48)

Error: Provider azureopenai:chat:gpt4 does not implement callEmbeddingApi for answer relevancy check, falling back to default

Error: Provider azureopenai:chat:gpt4 does not implement callEmbeddingApi for answer relevancy check, falling back to default
    at getAndCheckProvider (C:\Users\XXXXXXXX\AppData\Roaming\npm\node_modules\promptfoo\dist\src\matchers.js:79:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async matchesAnswerRelevance (C:\Users\XXXXXXXX\AppData\Roaming\npm\node_modules\promptfoo\dist\src\matchers.js:297:29)
    at async runAssertion (C:\Users\XXXXXXXX\AppData\Roaming\npm\node_modules\promptfoo\dist\src\assertions.js:665:17)
    at async runAssertions (C:\Users\XXXXXXXX\AppData\Roaming\npm\node_modules\promptfoo\dist\src\assertions.js:73:24)
    at async Evaluator.runEval (C:\Users\XXXXXXXX\AppData\Roaming\npm\node_modules\promptfoo\dist\src\evaluator.js:210:37)
    at async C:\Users\francisco.j.lopez\AppData\Roaming\npm\node_modules\promptfoo\dist\src\evaluator.js:475:25

_Originally posted by @FJLopezGarcia in https://github.com/promptfoo/promptfoo/issues/369#issuecomment-1881068087_
            

removing the defaultTest: section to not override the LLM grader:
I am getting this message 
You are using model-graded assertions of types factuality, answer-relevance, context-recall, context-relevance, context-faithfulness while testing an Azure provider. You may need to override these to use your Azure deployment. To learn more, see https://promptfoo.dev/docs/providers/azure/#model-graded-tests
![image](https://github.com/promptfoo/promptfoo/assets/6631983/89a260ee-b833-4f24-965f-dad4e71837b0)

But it seems that it is works. 
Am I doing something wrong?
![image](https://github.com/promptfoo/promptfoo/assets/6631983/c3ab06ee-4458-491c-885c-ed765ded9a04)



Thanks for the report.  This error is occurring because the `answer-relevance` assertion requires both an embedding and text generation provider.  Each model is a separate deployment.

There is a bug in how promptfoo supports this right now.  After #386 lands, you should be able to run this eval with the following:

```yaml
defaultTest:
  options:
    provider:
      text:
        id: azureopenai:chat:gpt-4-deployment
        config:
          apiHost: xxx.openai.azure.com
      embedding:
        id: azureopenai:embeddings:text-embedding-ada-002-deployment
        config:
          apiHost: xxx.openai.azure.com
```

Fix for this landed in 0.35.1