tidychatmodels icon indicating copy to clipboard operation
tidychatmodels copied to clipboard

Support Azure openAI deployments

Open AlbertRapp opened this issue 1 year ago • 6 comments

The goal is to support Azure openAI deployments

AlbertRapp avatar Mar 07 '24 19:03 AlbertRapp

Great package! Really like your approach. I see you self-assigned Azure OpenAI. If you haven't started on this yet, would you mind if I contributed a PR? I've implemented it for some other packages, and there are some specifics to it that aren't very well documented.

JamesHWade avatar Mar 21 '24 19:03 JamesHWade

Along those same lines, what do you think about S3 for create_chat? I could see it getting a bit cumbersome as more services get added.

JamesHWade avatar Mar 21 '24 19:03 JamesHWade

Hey James 👋 I self-assigned all issues just because....well really there's no particulary good reason :D So go for it, thank you :)

Btw, I imagined that to support Azure openAI only the url in create_chat() would need to be changed using the resource group and deployment name. From a usability perspective I wonder whether adding a whole bunch of more arguments to create_chat() is a great idea. Maybe one could incorporate additional information into an argument called config_list where the docs state what additional named entries the list would need to have depending on the vendor. Maybe one could even create a bunch of helpers like config_list_*() that has the necessary arguments, e.g. config_list_azure(resource_group_url, deployment_name).

Ahh your next comment just came in as I was typing this. I would prefer using such a functional approach rather than an object-oriented approach. How do you feel about this? Do you see more advantages of going S3? (To be honest, I'm not so well-versed in OO and I feel like a functional approach is more R-centric. So that's my prefered solution but I can be convinced otherwise)

AlbertRapp avatar Mar 21 '24 19:03 AlbertRapp

Hmm now that I think about this more, I'm not quite sure what the advantages of S3 are (sorry not well-versed with OO) 😄. I believe the things with config_list_*() would only change the user-facing syntax and behind the scenes it can still be S3, right? 🤔

AlbertRapp avatar Mar 21 '24 19:03 AlbertRapp

I'll give the azure openai implementation a try with config_list_azure(). I can separately create a draft S3 implementation to see if you think it would be useful. No worries if you stick with functional approach (that's typically my bias, too).

JamesHWade avatar Mar 21 '24 22:03 JamesHWade

Thank you for the great package, Albert! As a user in one of the banned countries, I'm really looking forward to the Azure OpenAI support.

JiaZhang42 avatar Mar 23 '24 04:03 JiaZhang42