mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-17 15:52:50 +00:00
feat: allow to set a baseurl (#310)
* feat: allow to set a baseURL for OpenAI providers This allows to run local models that have a compatible OpenAI API, or for instance use a proxy. Signed-off-by: mudler <mudler@mocaccino.org> * feat: allow to set baseURL in the auth subcommand Signed-off-by: mudler <mudler@mocaccino.org> --------- Signed-off-by: mudler <mudler@mocaccino.org> Co-authored-by: Alex Jones <alexsimonjones@gmail.com> Co-authored-by: Matthis <99146727+matthisholleville@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
754bf917e1
commit
cf797a6eb6
@@ -29,6 +29,7 @@ import (
|
||||
var (
|
||||
backend string
|
||||
password string
|
||||
baseURL string
|
||||
model string
|
||||
)
|
||||
|
||||
@@ -86,6 +87,7 @@ var AuthCmd = &cobra.Command{
|
||||
Name: backend,
|
||||
Model: model,
|
||||
Password: password,
|
||||
BaseURL: baseURL,
|
||||
}
|
||||
|
||||
if providerIndex == -1 {
|
||||
@@ -113,4 +115,6 @@ func init() {
|
||||
AuthCmd.Flags().StringVarP(&model, "model", "m", "gpt-3.5-turbo", "Backend AI model")
|
||||
// add flag for password
|
||||
AuthCmd.Flags().StringVarP(&password, "password", "p", "", "Backend AI password")
|
||||
// add flag for url
|
||||
AuthCmd.Flags().StringVarP(&baseURL, "baseurl", "u", "", "URL AI provider, (e.g `http://localhost:8080/v1`)")
|
||||
}
|
||||
|
Reference in New Issue
Block a user