-
Notifications
You must be signed in to change notification settings - Fork 694
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support many:1 auth:provider mapping
Added the ability to add multiple configurations for the same backend provider. One to one auth:provider mapping had many bugs and users were requesting many to one auth:provider mapping functionality for more flexibility with backend provider configurations. This commit also includes the addition of an optional `--config-name` flag to allow users to specify the config-name while configuring backend AI providers. Changes exclusive to individual subcommands are: 1. default - `--config-name` flag has been added to allow users to update the default configuration for a backend AI provider. - Setting the `--config-name` flag will only update the default configuration for the specified backend, it will not update the `configAI.DefaultProvider`. - To update the `configAI.DefaultProvider`, user must leave the `--config-name` flag unset. 2. list - The list subcommand will now respect the value of `userInput` set when the user is asked to show password or not. - The command's output has been modified to display the backend providers list along with their configuration names. - Default configs for each backend AI provider are marked with the `(Default Config)` string in bright yellow color. 3. remove - Users can specify either single or multiple backends when removing the configurations. - If the `--config-name` flag is not set, the "default" configuration for the specified backend(s) will be removed(if it is present). - Setting the `--config-name` flag will specify the configuration name to delete for each of the specified backends. 4. Update - Now the user can only specify a single backend provider at a time. This has been done because updating multiple backend configs with same values of parameters doesn't make any sense. - Removal of the `Args` function because update subcommand can have multiple args to set different parameters for a backend config. - Users can also update the configuration name for an already existing config. Addresses: - #936 - #911 - #905 - #900 - #843 Signed-off-by: VaibhavMalik4187 <[email protected]>
- Loading branch information
1 parent
a3cd7e6
commit 241a712
Showing
9 changed files
with
462 additions
and
290 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ import ( | |
|
||
var ( | ||
backend string | ||
configName string | ||
password string | ||
baseURL string | ||
endpointName string | ||
|
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
Oops, something went wrong.