cosoare
12/28/2024, 3:39 PMian
01/01/2025, 11:16 PMpy
def call_api(prompt: str) -> ProviderResponse:
and throw an error if the response format is not accurate.
Alternatively, you can set response_format on the provider config as a json schema. Example of that [here](https://github.com/promptfoo/promptfoo/blob/700904ffa602b687cdf6e6c616e061315e6a5310/examples/openai-structured-output/promptfooconfig.yaml#L9)cosoare
01/02/2025, 5:00 PMcosoare
01/02/2025, 5:42 PM