-
Notifications
You must be signed in to change notification settings - Fork 162
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
Add an IChatClient implementation to OnnxRuntimeGenAI #987
Conversation
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.
Then only issue I found is that when ChatOptions is null, it fails for Phi 3.5. This works fine for Phi3.
Phi 3.5 requires max_length to be provided. Seems to be a bug on Phi3.5, but I do not see a way around it, other than always providing max_length.
@stephentoub can you please merge main into your branch? This should enable the CIs to pass |
Thanks, but it's already based off of the latest commit in main. It seems like whatever feed is being used may not contain some of the necessary packages, like System.Text.Json? |
Can you add a test? |
@pranavsharma Seems like the package needs to be added to the feed, from the upstream (nuget.org). |
Yes |
Build is still failing due to the package not being available on the ORT-Nightly feed. |
@pranavsharma, I will update the PR with tests, but I first need your help in getting the feed updated with the necessary dependencies. Otherwise, nothing here even builds. |
I can help with that. Is System.Text.Json the only package needed. Will try to have it resolved soon. |
Thanks. I'm not sure what's currently available in the feed, but at a minimum you'd need to add Microsoft.Extensions.AI.Abstractions. That itself has a System.Text.Json dependency downlevel. |
@baijumeswani, also #970 needs Microsoft.ML.Tokenizers |
Thanks for the info. A few of our engineering systems team members are out of office this week. And I am trying to find out how to upload nuget packages to our feed. It might take until next week to have this setup. |
I have (hopefully) added all the dependencies. Please see the latest windows cpu build. |
1635cb1
to
87d55a8
Compare
Hi folks, Just checking back in on this. Let us know how we can help. Thanks! cc: @baijumeswani |
17754c0
to
de1656b
Compare
@baijumeswani The package version got updated, so we need the new packages from upstream saved into ort's feed again. Thanks in advance! |
b187dd4
to
cd5c44c
Compare
@baijumeswani is this okay to merge? |
This adds an
IChatClient
implementation to ONNX Runtime GenAI, enabling ONNX Runtime GenAI to be used anywhere anIChatClient
is being consumed, e.g.Typically the
IChatClient
will be configured in a dependency injection container, such that the application code consuming the client needn't be aware of the actual implementation, and the app's setup code can switch between implementations based on ONNX Runtime GenAI, OpenAI, Ollama, etc.