- Replaced `json.Parse` with `text.ExtractJSON` in the `Next` function of both the `keyword` and `needsearch` assistants for improved fault-tolerant JSON extraction from LLM output. - Simplified content handling by removing unnecessary markdown code block processing, enhancing clarity and efficiency in keyword extraction. - Updated comments to reflect the changes in the extraction method, ensuring better understanding of the functionality.
28 lines
616 B
Go
28 lines
616 B
Go
package main
|
|
|
|
import (
|
|
_ "github.com/yaoapp/gou/diff"
|
|
_ "github.com/yaoapp/gou/encoding"
|
|
_ "github.com/yaoapp/gou/text"
|
|
_ "github.com/yaoapp/yao/aigc"
|
|
_ "github.com/yaoapp/yao/crypto"
|
|
_ "github.com/yaoapp/yao/excel"
|
|
_ "github.com/yaoapp/yao/helper"
|
|
_ "github.com/yaoapp/yao/openai"
|
|
_ "github.com/yaoapp/yao/seed"
|
|
_ "github.com/yaoapp/yao/trace/jsapi"
|
|
_ "github.com/yaoapp/yao/wework"
|
|
|
|
"github.com/yaoapp/yao/cmd"
|
|
"github.com/yaoapp/yao/utils"
|
|
//
|
|
// _ "net/http/pprof"
|
|
)
|
|
|
|
func main() {
|
|
// go func() {
|
|
// log.Println(http.ListenAndServe("localhost:6060", nil))
|
|
// }()
|
|
utils.Init()
|
|
cmd.Execute()
|
|
}
|