royerlab / napari-chatgpt

A napari plugin to process and analyse images with chatGPT!
BSD 3-Clause "New" or "Revised" License
224 stars 24 forks source link

adding support for azure, cohere, replicate and unifying claude/openai call #19

Open krrishdholakia opened 11 months ago

krrishdholakia commented 11 months ago

Hi @royerloic,

Noticed you're calling multiple providers w/ langchain. I'm working on litellm (simple library to standardize LLM API Calls - https://github.com/BerriAI/litellm) and was wondering if we could be helpful.

I unified your claude + openai call and added support for Cohere, Azure and Llama2 (via Replicate) by setting client in the langchain ChatOpenAI class. The code is pretty similar to the OpenAI class - as litellm follows the same pattern as the openai-python sdk.

Would love to know if this helps.

Happy to add additional tests / update documentation, if the initial PR looks good to you.

royerloic commented 11 months ago

Thanks for this PR krrishdholakia! Let me review this ASAP!

krrishdholakia commented 9 months ago

Hi @royerloic, bump on this?

What was litellm missing to be useful to you? Any feedback here would be helpful.