monarch-initiative / curate-gpt

LLM-driven curation assist tool (pre-alpha)
https://monarch-initiative.github.io/curate-gpt/
BSD 3-Clause "New" or "Revised" License
49 stars 11 forks source link

Add azure openai services client support #24

Open lucinvitae opened 5 months ago

lucinvitae commented 5 months ago

This PR adds support for using Azure OpenAI Services deployments instead of directly calling OpenAI. I was testing out this tool, and figured I would push the change upstream in case the maintainers want to support Azure integrations from potential future users. See the readme for additional instructions.

cmungall commented 5 months ago

Thanks!

We are thinking of using https://github.com/BerriAI/litellm for this kind of thing in future, see #15

However we appreciate it's an issue having another server running so I think we can merge this

lucinvitae commented 5 months ago

@cmungall sure thing! This (CurateGPT) is an exciting project, and I was happy to test it out.

Note: To get e2e ask commands working with the llm lib for my use case, I noticed that I needed to add some additional configuration (in extra-openai-models.yaml), and support for the azure deployment name. See:

Setting the deployment name isn't required in most cases. The current latest llm lib version may work out-of-the-box if the Azure deployment identifier is identical to the model name, but that was not the case for us.