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

I am trying to add these two assests using the AzureOpenAI provider with gpt4 model.
but I am getting error, is this asset type supported with the AzureOpenAI provider? why the error is refering to the OpenAI API key?
![image](https://github.com/promptfoo/promptfoo/assets/6631983/eb212697-24ed-4d3c-b182-53c7ce16ce63)
Thanks!


Have a look at https://promptfoo.dev/docs/configuration/expected-outputs/model-graded/#overriding-the-llm-grader

Looks like you need to override the LLM grader to use the AzureOpenAI provider.  For example:

```yaml
defaultTest:
  options:
    provider: azureopenai:gpt-4
tests:
    assert:
      - type: model-graded-closedqa
        value: ...
```

Hi @typpo  thanks a lot for your response...

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:
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