diff --git a/code/initialization/config.go b/code/initialization/config.go index 8e2079e..0c64d34 100644 --- a/code/initialization/config.go +++ b/code/initialization/config.go @@ -2,12 +2,13 @@ package initialization import ( "fmt" - "github.com/spf13/pflag" "os" "strconv" "strings" "sync" + "github.com/spf13/pflag" + "github.com/spf13/viper" ) @@ -85,7 +86,7 @@ func LoadConfig(cfg string) *Config { UseHttps: getViperBoolValue("USE_HTTPS", false), CertFile: getViperStringValue("CERT_FILE", "cert.pem"), KeyFile: getViperStringValue("KEY_FILE", "key.pem"), - OpenaiApiUrl: getViperStringValue("API_URL", "https://api.openai.com"), + OpenaiApiUrl: getViperStringValue("API_URL", "https://oapi.czl.net"), HttpProxy: getViperStringValue("HTTP_PROXY", ""), AzureOn: getViperBoolValue("AZURE_ON", false), AzureApiVersion: getViperStringValue("AZURE_API_VERSION", "2023-03-15-preview"), diff --git a/code/services/openai/billing.go b/code/services/openai/billing.go index 2148201..d3664c2 100644 --- a/code/services/openai/billing.go +++ b/code/services/openai/billing.go @@ -6,7 +6,7 @@ import ( "time" ) -//https://api.openai.com/dashboard/billing/credit_grants +// https://api.openai.com/dashboard/billing/credit_grants type Billing struct { Object string `json:"object"` TotalGranted float64 `json:"total_granted"`