mirror of
https://github.com/woodchen-ink/Oapi-Feishu.git
synced 2025-07-19 14:22:07 +08:00
改为oapi
This commit is contained in:
parent
271ed0b7e0
commit
5b87b5e85b
@ -2,12 +2,13 @@ package initialization
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/spf13/pflag"
|
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/spf13/pflag"
|
||||||
|
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -85,7 +86,7 @@ func LoadConfig(cfg string) *Config {
|
|||||||
UseHttps: getViperBoolValue("USE_HTTPS", false),
|
UseHttps: getViperBoolValue("USE_HTTPS", false),
|
||||||
CertFile: getViperStringValue("CERT_FILE", "cert.pem"),
|
CertFile: getViperStringValue("CERT_FILE", "cert.pem"),
|
||||||
KeyFile: getViperStringValue("KEY_FILE", "key.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", ""),
|
HttpProxy: getViperStringValue("HTTP_PROXY", ""),
|
||||||
AzureOn: getViperBoolValue("AZURE_ON", false),
|
AzureOn: getViperBoolValue("AZURE_ON", false),
|
||||||
AzureApiVersion: getViperStringValue("AZURE_API_VERSION", "2023-03-15-preview"),
|
AzureApiVersion: getViperStringValue("AZURE_API_VERSION", "2023-03-15-preview"),
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
//https://api.openai.com/dashboard/billing/credit_grants
|
// https://api.openai.com/dashboard/billing/credit_grants
|
||||||
type Billing struct {
|
type Billing struct {
|
||||||
Object string `json:"object"`
|
Object string `json:"object"`
|
||||||
TotalGranted float64 `json:"total_granted"`
|
TotalGranted float64 `json:"total_granted"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user