Quellcode durchsuchen

问题功能添加

WH01243 vor 5 Monaten
Ursprung
Commit
855732a447

+ 0 - 22
api/aiSearch/aiSearch.go

@@ -1,22 +0,0 @@
-// =================================================================================
-// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
-// =================================================================================
-
-package aiSearch
-
-import (
-	"context"
-
-	"aiChat/api/aiSearch/v1"
-)
-
-type IAiSearchV1 interface {
-	CreateNewSession(ctx context.Context, req *v1.CreateNewSessionReq) (res *v1.CreateNewSessionRes, err error)
-	LikeSession(ctx context.Context, req *v1.LikeSessionReq) (res *v1.LikeSessionRes, err error)
-	HistorySsList(ctx context.Context, req *v1.HistorySsListReq) (res *v1.HistorySsListRes, err error)
-	SessionDetail(ctx context.Context, req *v1.SessionDetailReq) (res *v1.SessionDetailRes, err error)
-	ProblemDelete(ctx context.Context, req *v1.ProblemDeleteReq) (res *v1.ProblemDeleteRes, err error)
-	ProblemList(ctx context.Context, req *v1.ProblemListReq) (res *v1.ProblemListRes, err error)
-	ProblemConfiguration(ctx context.Context, req *v1.ProblemConfigurationReq) (res *v1.ProblemConfigurationRes, err error)
-	ProblemCollect(ctx context.Context, req *v1.ProblemCollectReq) (res *v1.ProblemCollectRes, err error)
-}

+ 1 - 1
api/v1/aiChatApi.go → api/v1/aiChat/aiChatApi.go

@@ -1,4 +1,4 @@
-package v1
+package aiChat
 
 import (
 	"github.com/gogf/gf/v2/frame/g"

+ 10 - 0
internal/cmd/cmd.go

@@ -5,6 +5,9 @@ import (
 	"aiChat/internal/controller/aiSearch"
 	"aiChat/internal/middleware"
 	"context"
+	"github.com/gogf/gf/v2/os/gcfg"
+	"github.com/gogf/gf/v2/os/gctx"
+	"log"
 
 	"github.com/gogf/gf/v2/frame/g"
 	"github.com/gogf/gf/v2/net/ghttp"
@@ -39,3 +42,10 @@ var (
 		},
 	}
 )
+
+func Init() {
+	g.Cfg().GetAdapter().(*gcfg.AdapterFile).SetFileName("ai-search.yaml")
+	var ctx = gctx.New()
+	log.Println(g.Cfg().MustGet(ctx, "aa").Int64())
+	log.Println(g.Cfg().MustGet(ctx, "server.address").Strings())
+}

+ 1 - 1
internal/controller/chatHistory.go

@@ -1,7 +1,7 @@
 package controller
 
 import (
-	v1 "aiChat/api/v1"
+	v1 "aiChat/api/v1/aiChat"
 	"aiChat/internal/model"
 	"app.yhyue.com/moapp/jybase/encrypt"
 	"context"

+ 1 - 1
internal/controller/evaluate.go

@@ -1,7 +1,7 @@
 package controller
 
 import (
-	v1 "aiChat/api/v1"
+	v1 "aiChat/api/v1/aiChat"
 	"aiChat/internal/model"
 	"app.yhyue.com/moapp/jybase/encrypt"
 	"context"

+ 1 - 1
internal/controller/findAnswer.go

@@ -1,7 +1,7 @@
 package controller
 
 import (
-	v1 "aiChat/api/v1"
+	v1 "aiChat/api/v1/aiChat"
 	"aiChat/internal/model"
 	"context"
 	"fmt"

+ 1 - 1
internal/controller/usuallyProblem.go

@@ -1,7 +1,7 @@
 package controller
 
 import (
-	v1 "aiChat/api/v1"
+	v1 "aiChat/api/v1/aiChat"
 	"aiChat/internal/model"
 	"context"
 	"fmt"

+ 1 - 1
internal/model/answer.go

@@ -1,7 +1,7 @@
 package model
 
 import (
-	v1 "aiChat/api/v1"
+	v1 "aiChat/api/v1/aiChat"
 	"aiChat/utility/fsw"
 	. "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/date"

+ 1 - 0
manifest/config/ai_search.yaml

@@ -0,0 +1 @@
+aaa: 111