-
Notifications
You must be signed in to change notification settings - Fork 56
Configuring aiohttp.web.ClientSession creation for CopilotStudio through ConnectionSettings #278
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
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.
Pull request overview
This PR adds the ability to configure the underlying aiohttp ClientSession by allowing users to pass custom keyword arguments through the ConnectionSettings. It also adds comprehensive docstrings to several methods in the CopilotClient class.
- Adds a
client_session_kwargsparameter toConnectionSettingsto allow customization of aiohttp's ClientSession - Updates
CopilotClient.post_request()to use the configurable session kwargs - Adds docstrings to
post_request(),start_conversation(),ask_question(), andask_question_with_activity()methods
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| connection_settings.py | Adds client_session_kwargs parameter with default values for optional parameters, includes initialization and documentation |
| copilot_client.py | Updates post_request() to use the new client_session_kwargs and adds comprehensive docstrings to public async methods |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...oft-agents-copilotstudio-client/microsoft_agents/copilotstudio/client/connection_settings.py
Outdated
Show resolved
Hide resolved
...icrosoft-agents-copilotstudio-client/microsoft_agents/copilotstudio/client/copilot_client.py
Outdated
Show resolved
Hide resolved
...oft-agents-copilotstudio-client/microsoft_agents/copilotstudio/client/connection_settings.py
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request enhances the flexibility and maintainability of the Copilot Studio client by allowing custom configuration of the underlying HTTP client and improving code documentation. The most significant updates include support for passing custom arguments to the
aiohttp.ClientSession, and the addition of detailed docstrings to key methods for better clarity.Custom client session configuration:
client_session_kwargsto theConnectionSettingsclass, allowing users to pass custom keyword arguments to the underlyingaiohttp.ClientSession(e.g., for timeouts, proxies, etc.). This parameter is stored as an instance variable and defaults to an empty dictionary if not provided. [1] [2]CopilotClient.post_requestmethod to use these custom session arguments when creating anaiohttp.ClientSession, increasing flexibility for different networking requirements.Improved documentation:
ConnectionSettings.__init__,CopilotClient.post_request,CopilotClient.start_conversation,CopilotClient.ask_question, andCopilotClient.ask_question_with_activitymethods. These docstrings clarify the purpose, parameters, and return values of each method, making the codebase easier to understand and maintain. [1] [2] [3] [4] [5]