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

Adding option for plugin timeout + using proper userId for guest accounts #314

Conversation

teresaqhoang
Copy link
Contributor

@teresaqhoang teresaqhoang commented Sep 7, 2023

Motivation and Context

Two small changes in this PR:

  1. Using ${account.localAccountId}.${account.tenantId} over account.homeAccountId to match how UserId is constructed for chat messages in webapi.
  2. Adds another option in appsettings to allow users to set a timeout limit for plugin calls.

Description

  1. How userId is constructed in webapi:
    image
  • ${account.localAccountId}.${account.tenantId} is more accurate for guest accounts, and it is not equivalent to the homeAccountid (which = {userIdInHomeTenant}.{HomeTenantId} for guest accounts).
  1. Default HttpClient.Timeout is 100 seconds; customer request to allow this to be configurable to accomodate plugins that take a long time.

Contribution Checklist

@teresaqhoang teresaqhoang requested a review from a team September 7, 2023 23:01
@teresaqhoang teresaqhoang self-assigned this Sep 7, 2023
@github-actions github-actions bot added webapp Pull requests that update Typescript code webapi Pull requests that update .net code PR: ready for review labels Sep 7, 2023
@teresaqhoang teresaqhoang added bug Something isn't working enhancement New feature or request and removed webapp Pull requests that update Typescript code webapi Pull requests that update .net code PR: ready for review labels Sep 7, 2023
@teresaqhoang teresaqhoang linked an issue Sep 7, 2023 that may be closed by this pull request
@github-actions github-actions bot added webapp Pull requests that update Typescript code webapi Pull requests that update .net code PR: ready for review labels Sep 7, 2023
@teresaqhoang teresaqhoang added this pull request to the merge queue Sep 7, 2023
Merged via the queue into microsoft:main with commit d57afc7 Sep 7, 2023
@teresaqhoang teresaqhoang deleted the plugin-timeout-and-guest-user-support branch September 7, 2023 23:16
teamleader-dev pushed a commit to vlink-group/chat-copilot that referenced this pull request Oct 7, 2024
…unts (microsoft#314)

### Motivation and Context

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

Two small changes in this PR:
1. Using `${account.localAccountId}.${account.tenantId}` over
account.homeAccountId to match how UserId is constructed for chat
messages in webapi.
2. Adds another option in appsettings to allow users to set a timeout
limit for plugin calls.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

1. How userId is constructed in webapi:

![image](https://github.com/microsoft/chat-copilot/assets/125500434/d23c9544-6bb4-484c-b6ad-ce48ed891474)
- `${account.localAccountId}.${account.tenantId}` is more accurate for
guest accounts, and it is not equivalent to the homeAccountid (which =
`{userIdInHomeTenant}.{HomeTenantId}` for guest accounts).
2. Default HttpClient.Timeout is 100 seconds; customer request to allow
this to be configurable to accomodate plugins that take a long time.

### 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 😄
kb0039 pushed a commit to aaronba/chat-copilot that referenced this pull request Jan 8, 2025
…unts (microsoft#314)

### Motivation and Context

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

Two small changes in this PR:
1. Using `${account.localAccountId}.${account.tenantId}` over
account.homeAccountId to match how UserId is constructed for chat
messages in webapi.
2. Adds another option in appsettings to allow users to set a timeout
limit for plugin calls.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

1. How userId is constructed in webapi:

![image](https://github.com/microsoft/chat-copilot/assets/125500434/d23c9544-6bb4-484c-b6ad-ce48ed891474)
- `${account.localAccountId}.${account.tenantId}` is more accurate for
guest accounts, and it is not equivalent to the homeAccountid (which =
`{userIdInHomeTenant}.{HomeTenantId}` for guest accounts).
2. Default HttpClient.Timeout is 100 seconds; customer request to allow
this to be configurable to accomodate plugins that take a long time.

### 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
bug Something isn't working enhancement New feature or request webapi Pull requests that update .net code webapp Pull requests that update Typescript code
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Webscraper plugin failing due to HttpClient.Timeout of 100 seconds
3 participants