refactor(rag): 重构 RAG 相关接口和验证器命名

- 修改 RAG 聊天接口验证器名称,从 "RagDefaultChat" 改为 "RagChat"
- 更新对应的路由处理函数,从 "default_talk" 改为 "chat"
- 在 api_mode.go 中添加 RAG 相关的常量注释
This commit is contained in:
Havoc412 2024-11-20 12:31:13 +08:00
parent 1c696523a3
commit 89bb14a298
3 changed files with 4 additions and 2 deletions

View File

@ -3,4 +3,6 @@ package consts
const (
// TAG animal/ 接口模式
AnimalModePrefer string = "prefer"
// TAG rag/
)

View File

@ -87,7 +87,7 @@ func WebRegisterValidator() {
containers.Set(key, nlp.Title{})
// TAG RAG
key = consts.ValidatorPrefix + "RagDefaultChat"
key = consts.ValidatorPrefix + "RagChat"
containers.Set(key, rag.Chat{})
key = consts.ValidatorPrefix + "RagRelease"
containers.Set(key, rag.Release{})

View File

@ -152,7 +152,7 @@ func InitWebRouter() *gin.Engine {
rag := backend.Group("rag")
{
rag.GET("default_talk", validatorFactory.Create(consts.ValidatorPrefix+"RagDefaultChat"))
rag.GET("chat", validatorFactory.Create(consts.ValidatorPrefix+"RagChat"))
rag.DELETE("", validatorFactory.Create(consts.ValidatorPrefix+"RagRelease"))
}