Skip to content

Commit

Permalink
fix: add providerId to serve mode (#1260)
Browse files Browse the repository at this point in the history
Signed-off-by: yanweili <yanweili@ibm.com>
Co-authored-by: yanweili <yanweili@ibm.com>
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
  • Loading branch information
2 people authored and AlexsJones committed Oct 24, 2024
1 parent b1528c7 commit ff73434
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/serve/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 != ""
Expand All @@ -119,6 +121,7 @@ var ServeCmd = &cobra.Command{
BaseURL: baseURL,
Engine: engine,
ProxyEndpoint: proxyEndpoint,
ProviderId: providerId,
Temperature: temperature(),
TopP: topP(),
TopK: topK(),
Expand Down

0 comments on commit ff73434

Please sign in to comment.