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
GitHub OpenAPI skill integration with planner #792
Merged
adrianwyatt
merged 12 commits into
microsoft:main
from
teresaqhoang:optimize-github-response
May 4, 2023
Merged
GitHub OpenAPI skill integration with planner #792
adrianwyatt
merged 12 commits into
microsoft:main
from
teresaqhoang:optimize-github-response
May 4, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glahaye
reviewed
May 3, 2023
samples/apps/copilot-chat-app/webapi/Skills/OpenApiSkills/GitHubSkill/Model/Label.cs
Outdated
Show resolved
Hide resolved
glahaye
previously approved these changes
May 3, 2023
amsacha
reviewed
May 3, 2023
amsacha
reviewed
May 3, 2023
adrianwyatt
requested changes
May 3, 2023
samples/apps/copilot-chat-app/webapi/Skills/OpenApiSkills/GitHubSkill/Model/PullRequest.cs
Outdated
Show resolved
Hide resolved
samples/apps/copilot-chat-app/webapi/Skills/OpenApiSkills/GitHubSkill/Model/PullRequest.cs
Outdated
Show resolved
Hide resolved
samples/apps/copilot-chat-app/webapi/Skills/OpenApiSkills/GitHubSkill/Model/Repo.cs
Outdated
Show resolved
Hide resolved
5 tasks
teresaqhoang
added
the
PR: ready for review
All feedback addressed, ready for reviews
label
May 4, 2023
adrianwyatt
approved these changes
May 4, 2023
teresaqhoang
added a commit
to teresaqhoang/semantic-kernel
that referenced
this pull request
May 4, 2023
### Motivation and Context This PR enables GitHub integration with Copilot Planner. ### Description Server-side - Added C# classes for GitHub schema objects - Adds tokenLimit for Planner response content. Currently, it's set at 75% of the remaining limit after memories response and document context have already been allocated. - Added `OptimizeOpenApiSkillJson` method that is called on Planner completion. This method: - removes all new line characters (huge token suck) from API response - truncates the API response by object until it's under the relatedInformationTokenLimit. - If the request can't be truncated, error message added to bot context - For GitHub skills specifically, the API response is deserialized into `PullRequest` or `PullRequest[]` objects to filter noisy properties. Web app side - If plugins require additional api requirements, these are added to the ask variables (rather than headers in http request) -- this allows the kernel/planner to directly consume these without any additional handling server side - `repo` and `owner` added as additional GitHub api requirements - Rename ApiRequirements to ApiProperties. These properties can be optional. ![image](https://user-images.githubusercontent.com/125500434/236005717-14016432-b5de-47b3-a128-e38418c267e3.png)
codebrain
pushed a commit
to searchpioneer/semantic-kernel
that referenced
this pull request
May 16, 2023
### Motivation and Context This PR enables GitHub integration with Copilot Planner. ### Description Server-side - Added C# classes for GitHub schema objects - Adds tokenLimit for Planner response content. Currently, it's set at 75% of the remaining limit after memories response and document context have already been allocated. - Added `OptimizeOpenApiSkillJson` method that is called on Planner completion. This method: - removes all new line characters (huge token suck) from API response - truncates the API response by object until it's under the relatedInformationTokenLimit. - If the request can't be truncated, error message added to bot context - For GitHub skills specifically, the API response is deserialized into `PullRequest` or `PullRequest[]` objects to filter noisy properties. Web app side - If plugins require additional api requirements, these are added to the ask variables (rather than headers in http request) -- this allows the kernel/planner to directly consume these without any additional handling server side - `repo` and `owner` added as additional GitHub api requirements - Rename ApiRequirements to ApiProperties. These properties can be optional. ![image](https://user-images.githubusercontent.com/125500434/236005717-14016432-b5de-47b3-a128-e38418c267e3.png)
dehoward
pushed a commit
to lemillermicrosoft/semantic-kernel
that referenced
this pull request
Jun 1, 2023
### Motivation and Context This PR enables GitHub integration with Copilot Planner. ### Description Server-side - Added C# classes for GitHub schema objects - Adds tokenLimit for Planner response content. Currently, it's set at 75% of the remaining limit after memories response and document context have already been allocated. - Added `OptimizeOpenApiSkillJson` method that is called on Planner completion. This method: - removes all new line characters (huge token suck) from API response - truncates the API response by object until it's under the relatedInformationTokenLimit. - If the request can't be truncated, error message added to bot context - For GitHub skills specifically, the API response is deserialized into `PullRequest` or `PullRequest[]` objects to filter noisy properties. Web app side - If plugins require additional api requirements, these are added to the ask variables (rather than headers in http request) -- this allows the kernel/planner to directly consume these without any additional handling server side - `repo` and `owner` added as additional GitHub api requirements - Rename ApiRequirements to ApiProperties. These properties can be optional. ![image](https://user-images.githubusercontent.com/125500434/236005717-14016432-b5de-47b3-a128-e38418c267e3.png)
golden-aries
pushed a commit
to golden-aries/semantic-kernel
that referenced
this pull request
Oct 10, 2023
### Motivation and Context This PR enables GitHub integration with Copilot Planner. ### Description Server-side - Added C# classes for GitHub schema objects - Adds tokenLimit for Planner response content. Currently, it's set at 75% of the remaining limit after memories response and document context have already been allocated. - Added `OptimizeOpenApiSkillJson` method that is called on Planner completion. This method: - removes all new line characters (huge token suck) from API response - truncates the API response by object until it's under the relatedInformationTokenLimit. - If the request can't be truncated, error message added to bot context - For GitHub skills specifically, the API response is deserialized into `PullRequest` or `PullRequest[]` objects to filter noisy properties. Web app side - If plugins require additional api requirements, these are added to the ask variables (rather than headers in http request) -- this allows the kernel/planner to directly consume these without any additional handling server side - `repo` and `owner` added as additional GitHub api requirements - Rename ApiRequirements to ApiProperties. These properties can be optional. ![image](https://user-images.githubusercontent.com/125500434/236005717-14016432-b5de-47b3-a128-e38418c267e3.png)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
This PR enables GitHub integration with Copilot Planner.
Description
Server-side
OptimizeOpenApiSkillJson
method that is called on Planner completion. This method:PullRequest
orPullRequest[]
objects to filter noisy properties.Web app side
repo
andowner
added as additional GitHub api requirements