Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Love the library! I had to make modifications to get it to work with the Azure instances of OpenAI models that I use. Primarily, I made it possible to pass an `engine` parameter to the LLMClassifier as well/instead of the `model` parameter [which is what the Azure instance requires](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/chatgpt?pivots=programming-language-chat-completions). I tried to do it in a way that minimized the # of edits on the existing codebase - if this is something you'd be interested in including, happy to make any changes to fit with your design principles. ``` import openai openai.api_type = "azure" openai.api_version = "2023-07-01-preview" openai.api_base = "https://azure-openai-xxxxx.openai.azure.com/" # Your Azure OpenAI resource's endpoint value. openai.api_key = "<AZURE-OPENAI_API-KEY>" evaluator = Factuality(engine="<Azure-Deployment-Name>", model=None) ``` --------- Co-authored-by: Ankur Goyal <ankrgyl@gmail.com>
- Loading branch information