-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for azure openai #16
Conversation
Signed-off-by: Chapman Pendery <cpendery@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this PR.
This seems to introduce a lot of code duplication. Couldn't you just subclass OpenAIModel
? Or perhaps even better to add some logic in OpenAIModel.__init__
to just initialize self.client
according to the prefix of SHORTCUTS
?
I’m happy to do either, I was just trying to avoid changing the convention of one class extending the base per model provider. I’ll go with the updating the OpenAIModel |
Signed-off-by: Chapman Pendery <cpendery@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! If you confirm that you've tested it, I think we're good to merge :)
If someone else can validate it before we merge, that would be great. I'm only on Windows so all the other issues are blocking me for verifying this works for the whole pipeline |
Let me ping @0xdevalias and @kim-borgen since they upvoted. Perhaps they can test this. |
@klieret I'm not currently setup to be able to test this unfortunately. I just liked the idea of wider support. |
@klieret Unfortunately I only have the 8k context length available for testing now and the first prompt (messages) is 10,963. Other than that, it seems to work. Sorry but I can't dedicate more time, but if someone supplies a config that uses less than 6k tokens for example I can test quickly Otherwise:
|
@kim-borgen Thanks for the quick check! Can you open issues with some more context for the "Otherwise" ;) (not sure if I fully understand the context of the second one yet) |
Co-authored-by: Massimiliano Pronesti <massimiliano.pronesti@gmail.com>
Signed-off-by: Chapman Pendery <cpendery@microsoft.com>
Signed-off-by: Chapman Pendery <cpendery@microsoft.com>
Since this doesn't seem to impact any other models anyway, I've gone ahead and merged it :) |
Note: We shouldn't override the |
Adds support for models hosted on Azure OpenAI under the model prefix
azure:
.Part of #14 & #22