-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Retry functionality for OpenAPI skills (#779)
### Motivation and Context This PR adds two improvements: - It extends all ImportOpenAPISkill* and ImportChatGptPluginSkill* methods to accept HTTP retry configuration. - It improves HttpClient usage in OpenAPI skills by reusing the same instance for the same set of imported skills. The first improvement will allow OpenAPI skill to be more resilient against unreliable REST API it tries to access. The second improvement will decrease number of HttpClient instances OpenAPI skills create. Instead of creating one instance of HttpClient per skill, one instance will be created per set of skills that are imported together by the same Import* method. This is the first step to decrease number of HttpClient created for OpenAPI skills and it's not the final one. Later, when agreed on a proper solution, the HttpClient could be externalized so that client code/hosting app could provide its own instance, if required. ### Description 1. All the ImportOpenAPISkill* and ImportChatGptPluginSkill* methods are extended to accept and respect HttpRetryConfig. 2. Functionality that creates HttpClient is moved one level up so that it's called once per import rather than for each skill in the import.
- Loading branch information
1 parent
06c57b6
commit 3013b5d
Showing
3 changed files
with
51 additions
and
25 deletions.
There are no files selected for viewing
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
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
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