Skip to content

Commit

Permalink
修复编译失败问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Dot-Liu committed Oct 29, 2024
1 parent 85df1a1 commit a342973
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/apinto/profession.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ func ApintoProfession() []*eosc.ProfessionConfig {
Name: "fakegpt", // 驱动名称,应和定义文件的provider字段一致
Label: "Fake GPT",
Desc: "Fake GPT",
},{
, Id: "eolinker.com:apinto:zhinao", // 插件ID
}, {
Id: "eolinker.com:apinto:zhinao", // 插件ID
Name: "zhinao", // 驱动名称,应和定义文件的provider字段一致
Label: "zhinao",
Desc: "zhinao",
Expand Down
5 changes: 5 additions & 0 deletions drivers/plugins/ai-prompt/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ func (e *executor) DoHttpFilter(ctx http_context.IHttpContext, next eocontext.IC
}
body, err = genRequestMessage(body, e.prompt, e.variables, e.required)
if err != nil {
result := make(map[string]interface{})
result["code"] = -1
result["error"] = err.Error()
marData, _ := json.Marshal(result)
ctx.Response().SetBody(marData)
return err
}
ctx.Proxy().Body().SetRaw("application/json", body)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/clbanning/mxj v1.8.4
github.com/coocood/freecache v1.2.2
github.com/dubbogo/gost v1.13.1
github.com/eolinker/eosc v0.18.0
github.com/eolinker/eosc v0.18.1
github.com/fasthttp/websocket v1.5.0
github.com/fullstorydev/grpcurl v1.8.7
github.com/go-redis/redis/v8 v8.11.5
Expand Down

0 comments on commit a342973

Please sign in to comment.