reface to openteam

This commit is contained in:
Sakurasan
2025-04-16 18:01:27 +08:00
parent bc223d6530
commit e7ffc9e8b9
92 changed files with 5345 additions and 1273 deletions

View File

@@ -17,7 +17,7 @@ var (
AuthCache *cache.Cache
)
func init() {
func InitCache() {
KeysCache = cache.New(cache.NoExpiration, cache.NoExpiration)
AuthCache = cache.New(cache.NoExpiration, cache.NoExpiration)
}

View File

@@ -13,7 +13,7 @@ var db *gorm.DB
var usage *gorm.DB
func init() {
func InitDB() {
if _, err := os.Stat("db"); os.IsNotExist(err) {
errDir := os.MkdirAll("db", 0755)
if errDir != nil {

View File

@@ -4,12 +4,12 @@ import (
"encoding/json"
"fmt"
"log"
"opencatd-open/pkg/vertexai"
"opencatd-open/llm/vertexai"
"os"
"time"
)
func init() {
func InitKey() {
// check vertex
if os.Getenv("Vertex") != "" {
vertex_auth := os.Getenv("Vertex")