Skip to content

.Net: Azure OpenAI Chat Completion with data#2498

Merged
dmytrostruk merged 32 commits intomicrosoft:mainfrom
dmytrostruk:chat-completion-with-data
Aug 22, 2023
Merged

.Net: Azure OpenAI Chat Completion with data#2498
dmytrostruk merged 32 commits intomicrosoft:mainfrom
dmytrostruk:chat-completion-with-data

Conversation

@dmytrostruk
Copy link
Member

Motivation and Context

Resolves #2326

Implementation of Azure OpenAI Chat Completion with data feature:
https://learn.microsoft.com/en-us/azure/ai-services/openai/use-your-data-quickstart

Description

  1. Implemented AzureChatCompletionWithData class, that uses HttpClient for API requests.
  2. Added necessary internal classes for request/response serialization/deserialization.
  3. Added unit tests.
  4. Added usage example.

Contribution Checklist

@dmytrostruk dmytrostruk requested a review from a team as a code owner August 18, 2023 13:45
@shawncal shawncal added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel kernel.core labels Aug 18, 2023
@dmytrostruk
Copy link
Member Author

Received great feedback from @rogerbarreto , will convert it to draft to add missing functionality.

@dmytrostruk dmytrostruk marked this pull request as draft August 18, 2023 17:57
@dmytrostruk dmytrostruk added the PR: in progress Under development and/or addressing feedback label Aug 18, 2023
Copy link
Member

@lemillermicrosoft lemillermicrosoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review, LGTM overall. Will do more when published.

@dmytrostruk dmytrostruk marked this pull request as ready for review August 18, 2023 22:09
@dmytrostruk dmytrostruk added PR: ready for review All feedback addressed, ready for reviews and removed PR: in progress Under development and/or addressing feedback labels Aug 18, 2023
Copy link
Member

@rogerbarreto rogerbarreto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

nit comments.

dmytrostruk and others added 2 commits August 21, 2023 17:39
…ionWithData.cs

Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
…ionWithData.cs

Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
dmytrostruk and others added 4 commits August 21, 2023 18:15
…ionWithData.cs

Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
…ionWithData.cs

Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
@dmytrostruk dmytrostruk added this pull request to the merge queue Aug 22, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 22, 2023
@dmytrostruk dmytrostruk added this pull request to the merge queue Aug 22, 2023
Merged via the queue into microsoft:main with commit 34f8cf4 Aug 22, 2023
@dmytrostruk dmytrostruk deleted the chat-completion-with-data branch August 22, 2023 16:05
SOE-YoungS pushed a commit to SOE-YoungS/semantic-kernel that referenced this pull request Nov 1, 2023
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

Resolves microsoft#2326

Implementation of Azure OpenAI Chat Completion with data feature:

https://learn.microsoft.com/en-us/azure/ai-services/openai/use-your-data-quickstart

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Implemented `AzureChatCompletionWithData` class, that uses
`HttpClient` for API requests.
2. Added necessary internal classes for request/response
serialization/deserialization.
3. Added unit tests.
4. Added usage example.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code PR: ready for review All feedback addressed, ready for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Call Azure OpenAI Studio as model endpoint

5 participants