-
Notifications
You must be signed in to change notification settings - Fork 248
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
Adding a minimal Azure OpenAI Inference SDK. #1813
base: main
Are you sure you want to change the base?
Conversation
Please go through style errors. We don't want to increase technical debt, which is why they are build errors. I find it helps to run them locally before pushing more commits, especially since it keeps updating the PR. On that note, I'm very busy at the moment trying to prepare crates we plan on releasing as betas soon. What timeframe do you have in mind for releasing an OpenAI SDK for Rust? It was not previously on our docket of support. /cc @RickWinter @ronniegeraghty |
We're still working on some big changes with I'll do a cursory review about the overall structure and public APIs, but not in-depth at this time. Can you also create a separate feature branch e.g., git fetch upstream feature/track2 # assumes this is the "upstream" repo
git push upstream FETCH_HEAD:feature/openai
git checkout jpalvarezl/aoai_from_track2 # check out your topic branch if not already
git rebase upstream/feature/openai
git push --force Then in your PR on this site, retarget using the Edit button. |
use super::*; | ||
|
||
#[derive(Clone, Debug, Default)] | ||
pub struct OpenAIClientOptionsBuilder { |
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.
You should also implement azure_core::ClientOptionsBuilder
. See guidelines for details. We'll have a derive macro eventually to make this easier but aren't there yet.
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.
Same is true for client method options.
} | ||
|
||
impl BaseOpenAIClientMethods for AzureOpenAIClient { | ||
fn base_url(&self, deployment_name: Option<&str>) -> azure_core::Result<Url> { |
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.
As a caller, I would wonder what the difference is between endpoint
and base_url
. Public API docs will be required before you can ship, but I would describe at least these two methods now.
async fn create_chat_completions( | ||
&self, | ||
deployment_name: impl AsRef<str>, | ||
chat_completions_request: &CreateChatCompletionsRequest, |
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.
These should be client method options. See guidelines.
Co-authored-by: Heath Stewart <[email protected]>
f00dd19
to
a82e472
Compare
This is clearly going through a lot of development and iteration. I highly recommend building and testing locally before submitted. As it's not ready for review (see comments above, along with how frequently you're pushing commits) I'm marking this as a draft. When you think it's ready for a final review and have talked with @ronniegeraghty, please convert it back to a full PR. |
My apologies if it seemed like I was adding more changes to this PR. I tried following the steps you suggested to move the branch to this repository, but I must have done something wrong and ran into some issues which resulted on me ending up doing something else entirely by accident, causing a mess with the commit history. It seems like I rebased First of all, thank you for your early feedback. I have addressed all the items that I marked as resolve taking in your comments in full. Also, addressed the CI checks. The comments that are still unresolved, seemed a bit more involved, so I want to find the time to be able to dedicate my full attention to them. I am waiting on being able to talk sync with @trrwilson to figure out how to best approach and move forward with this effort. |
Sorry for not addressing the style checks yet. I am aware of them and will address them ASAP. I just wanted to have this PR opened before the Hackathon was over.Style checks have been addressed.Contents of this PR
ChatCompletions
operation. Using as many server default values as possible.ChatCompletionsClient
can be used with Azure or non-Azure OpenAI serviceRemaining TODOs from original PoC
ChatCompletions
modelsEdited on 01/10/2024