mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-18 13:47:21 +08:00
RAGFlow go API server (#13240)
# RAGFlow Go Implementation Plan 🚀 This repository tracks the progress of porting RAGFlow to Go. We'll implement core features and provide performance comparisons between Python and Go versions. ## Implementation Checklist - [x] User Management APIs - [x] Dataset Management Operations - [x] Retrieval Test - [x] Chat Management Operations - [x] Infinity Go SDK --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com> Co-authored-by: Yingfeng Zhang <yingfeng.zhang@gmail.com>
This commit is contained in:
34
cmd/ragflow_cli.go
Normal file
34
cmd/ragflow_cli.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"ragflow/internal/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Create CLI instance
|
||||
cliApp, err := cli.NewCLI()
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to create CLI: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Handle interrupt signal
|
||||
sigChan := make(chan os.Signal, 1)
|
||||
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
|
||||
go func() {
|
||||
<-sigChan
|
||||
cliApp.Cleanup()
|
||||
os.Exit(0)
|
||||
}()
|
||||
|
||||
// Run CLI
|
||||
if err := cliApp.Run(); err != nil {
|
||||
fmt.Printf("CLI error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user