mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-08-01 23:49:14 +00:00
fix: add providerId to serve mode (#1260)
Signed-off-by: yanweili <yanweili@ibm.com> Co-authored-by: yanweili <yanweili@ibm.com> Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
This commit is contained in:
parent
b1528c77a0
commit
ff73434d34
@ -14,10 +14,11 @@ limitations under the License.
|
||||
package serve
|
||||
|
||||
import (
|
||||
k8sgptserver "github.com/k8sgpt-ai/k8sgpt/pkg/server"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
k8sgptserver "github.com/k8sgpt-ai/k8sgpt/pkg/server"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/k8sgpt-ai/k8sgpt/pkg/ai"
|
||||
"github.com/spf13/cobra"
|
||||
@ -108,6 +109,7 @@ var ServeCmd = &cobra.Command{
|
||||
baseURL := os.Getenv("K8SGPT_BASEURL")
|
||||
engine := os.Getenv("K8SGPT_ENGINE")
|
||||
proxyEndpoint := os.Getenv("K8SGPT_PROXY_ENDPOINT")
|
||||
providerId := os.Getenv("K8SGPT_PROVIDER_ID")
|
||||
// If the envs are set, allocate in place to the aiProvider
|
||||
// else exit with error
|
||||
envIsSet := backend != "" || password != "" || model != ""
|
||||
@ -119,6 +121,7 @@ var ServeCmd = &cobra.Command{
|
||||
BaseURL: baseURL,
|
||||
Engine: engine,
|
||||
ProxyEndpoint: proxyEndpoint,
|
||||
ProviderId: providerId,
|
||||
Temperature: temperature(),
|
||||
TopP: topP(),
|
||||
TopK: topK(),
|
||||
|
Loading…
Reference in New Issue
Block a user