Skip to content
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

Refactor ChatController for Asynchronous Plugin Registration #864

Merged

Conversation

Ahmed-Adel3
Copy link
Contributor

This commit introduces asynchronous registration of plugins in the ChatController. The changes improve the efficiency of the chat function by allowing multiple plugins to be registered concurrently. This enhancement is expected to improve response times and overall performance of the chat functionality.

Motivation and Context

  1. This change is required to improve the efficiency and performance of the chat functionality in the application.
  2. The current synchronous registration of plugins in the ChatController can lead to slower response times. This change solves this problem by introducing asynchronous registration, allowing multiple plugins to be registered concurrently.
  3. This contributes to the scenario where the application needs to handle multiple chat sessions simultaneously, each potentially requiring different sets of plugins. With the asynchronous registration, the application can now handle these scenarios more efficiently.
  4. This change does not directly fix an open issue, but it is a proactive measure to enhance the application's performance and scalability.

Description

This edit is just a simple separation of registration of plugins [ JIRA - GRAPH - GITHUB - Custom plugins ] each one of them in a separate Asynchronous function and registering the enabled plugins simultaneously, as this process occurs each time a message is sent to chatbot.

Contribution Checklist

This commit introduces asynchronous registration of plugins in the ChatController. The changes improve the efficiency of the chat function by allowing multiple plugins to be registered concurrently. This enhancement is expected to improve response times and overall performance of the chat functionality.
@github-actions github-actions bot added the webapi Pull requests that update .net code label Mar 15, 2024
@Ahmed-Adel3
Copy link
Contributor Author

Ahmed-Adel3 commented Mar 15, 2024 via email

@Ahmed-Adel3 Ahmed-Adel3 force-pushed the chat-controller-enhance-plugin-registration branch 2 times, most recently from 66131c8 to 9fff726 Compare March 22, 2024 09:47
@glahaye glahaye added this pull request to the merge queue Mar 24, 2024
Merged via the queue into microsoft:main with commit 55b1c9b Mar 24, 2024
7 checks passed
teamleader-dev pushed a commit to vlink-group/chat-copilot that referenced this pull request Oct 7, 2024
…ft#864)

This commit introduces asynchronous registration of plugins in the
ChatController. The changes improve the efficiency of the chat function
by allowing multiple plugins to be registered concurrently. This
enhancement is expected to improve response times and overall
performance of the chat functionality.

### Motivation and Context

1. This change is required to improve the efficiency and performance of
the chat functionality in the application.
2. The current synchronous registration of plugins in the ChatController
can lead to slower response times. This change solves this problem by
introducing asynchronous registration, allowing multiple plugins to be
registered concurrently.
3. This contributes to the scenario where the application needs to
handle multiple chat sessions simultaneously, each potentially requiring
different sets of plugins. With the asynchronous registration, the
application can now handle these scenarios more efficiently.
4. This change does not directly fix an open issue, but it is a
proactive measure to enhance the application's performance and
scalability.

### Description
This edit is just a simple separation of registration of plugins [ JIRA
- GRAPH - GITHUB - Custom plugins ] each one of them in a separate
**Asynchronous** function and registering the enabled plugins
simultaneously, as this process occurs each time a message is sent to
chatbot.

### 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/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/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 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
webapi Pull requests that update .net code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants