reface to openteam
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user