Skip to content

Commit

Permalink
🔧 Update OpenApiPlugin paths (microsoft#127)
Browse files Browse the repository at this point in the history
### Motivation and Context

<!-- Thank you for your contribution to the copilot-chat 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.
-->

Updated OpenApiPlugin paths from `CopilotChat/Skills` to `Skills` in
ChatController.cs.
Also added autogenerated sln file to .gitignore

### Contribution Checklist

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

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
~~- [ ] All unit tests pass, and I have added new tests where possible~~
- [x] I didn't break anyone 😄
  • Loading branch information
teresaqhoang authored Aug 8, 2023
1 parent 3b22b1b commit 894e9a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -480,4 +480,7 @@ webapp/build/
webapp/node_modules/

# Custom plugin files used in webapp for testing
webapp/public/.well-known*
webapp/public/.well-known*

# Auto-generated solution file from Visual Studio
webapi/CopilotChatWebApi.sln
4 changes: 2 additions & 2 deletions webapi/Controllers/ChatController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private async Task RegisterPlannerSkillsAsync(CopilotChatPlanner planner, Dictio
BearerAuthenticationProvider authenticationProvider = new(() => Task.FromResult(GithubAuthHeader));
await planner.Kernel.ImportAIPluginAsync(
skillName: "GitHubPlugin",
filePath: Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "CopilotChat", "Skills", "OpenApiPlugins/GitHubPlugin/openapi.json"),
filePath: Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "Skills", "OpenApiPlugins/GitHubPlugin/openapi.json"),
new OpenApiSkillExecutionParameters
{
AuthCallback = authenticationProvider.AuthenticateRequestAsync,
Expand All @@ -200,7 +200,7 @@ await planner.Kernel.ImportAIPluginAsync(

await planner.Kernel.ImportAIPluginAsync(
skillName: "JiraPlugin",
filePath: Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "CopilotChat", "Skills", "OpenApiPlugins/JiraPlugin/openapi.json"),
filePath: Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "Skills", "OpenApiPlugins/JiraPlugin/openapi.json"),
new OpenApiSkillExecutionParameters
{
AuthCallback = authenticationProvider.AuthenticateRequestAsync,
Expand Down

0 comments on commit 894e9a3

Please sign in to comment.