mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-06 09:13:47 +08:00
feat: payjs service is ready
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"chatplus/core/types"
|
||||
"chatplus/utils"
|
||||
"chatplus/utils/resp"
|
||||
"fmt"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -33,7 +35,7 @@ func (h *PromptHandler) Rewrite(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
content, err := utils.OpenAIRequest(h.db, data.Prompt, rewritePromptTemplate)
|
||||
content, err := utils.OpenAIRequest(h.db, fmt.Sprintf(rewritePromptTemplate, data.Prompt), h.App.Config.ProxyURL)
|
||||
if err != nil {
|
||||
resp.ERROR(c, err.Error())
|
||||
return
|
||||
@@ -51,7 +53,7 @@ func (h *PromptHandler) Translate(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
content, err := utils.OpenAIRequest(h.db, data.Prompt, translatePromptTemplate)
|
||||
content, err := utils.OpenAIRequest(h.db, fmt.Sprintf(translatePromptTemplate, data.Prompt), h.App.Config.ProxyURL)
|
||||
if err != nil {
|
||||
resp.ERROR(c, err.Error())
|
||||
return
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"chatplus/utils"
|
||||
"chatplus/utils/resp"
|
||||
"fmt"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -20,7 +21,7 @@ func NewTestHandler(db *gorm.DB, snowflake *service.Snowflake) *TestHandler {
|
||||
}
|
||||
|
||||
func (h *TestHandler) Test(c *gin.Context) {
|
||||
h.initMjTaskId(c)
|
||||
h.initUserNickname(c)
|
||||
}
|
||||
|
||||
func (h *TestHandler) initUserNickname(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user