package main import ( "data_ai/extract" "data_ai/tool" "data_ai/udp" "data_ai/ul" log "github.com/donnie4w/go-logger/logger" ) func init() { //增量设置全部false ul.IsTool = true ul.IsFull = false ul.IsLocal = true if ul.IsTool { log.Debug("工具版本···") ul.InitToolVar() } else { ul.InitGlobalVar() if !ul.IsFull { log.Debug("正常版本···") udp.InitProcessVar() } else { log.Debug("全量版本···") } } } func main() { if ul.IsTool { tool.StartToolInfo() return } else { if !ul.IsFull { extract.TestSingleFieldInfo("bidding", "670cc446b25c3e1deb887d52") return } } lock := make(chan bool) <-lock } //func test() { // log.Debug("开始大模型验证内存数据···") // q := map[string]interface{}{} // pool_mgo := make(chan bool, ul.Reading) // wg_mgo := &sync.WaitGroup{} // sess := ul.SourceMgo.GetMgoConn() // defer ul.SourceMgo.DestoryMongoConn(sess) // total, isok := 0, 0 // it := sess.DB(ul.SourceMgo.DbName).C(ul.Ext_Name).Find(&q).Sort("_id").Iter() // for tmp := make(map[string]interface{}); it.Next(&tmp); total++ { // if total%100 == 0 { // log.Debug("cur index ", total) // } // isok++ // pool_mgo <- true // wg_mgo.Add(1) // go func(tmp map[string]interface{}) { // defer func() { // <-pool_mgo // wg_mgo.Done() // }() // detail := qu.ObjToString(tmp["detail"]) // filetext := qu.ObjToString(tmp["filetext"]) //此处为附件信息··· // if utf8.RuneCountInString(detail) < 100 { // detail = filetext // } // detail = ul.HttpConvertToMarkdown(detail) // //最终结果... // if detail != "" { // // } // }(tmp) // tmp = make(map[string]interface{}) // } // wg_mgo.Wait() // log.Debug("ai is over ...") //}