mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-13 11:53:42 +08:00
feat: Refactor message handling and update dependencies
- Added required packages to go.mod: `github.com/Laisky/errors/v2 v2.0.1`, `github.com/stretchr/testify v1.8.3`, `github.com/davecgh/go-spew v1.1.1`, `github.com/pmezard/go-difflib v1.0.0` - Increased the number of returned recordings to 100 in `relay-utils.go` - Refactored and simplified code in `relay-aiproxy.go` for improved message retrieval and error handling - Added new test file `relay_test.go` and various test cases for different message types - Modified functions in `group.go` and `relay.go` for improved functionality
This commit is contained in:
@@ -23,17 +23,17 @@ func printHelp() {
|
||||
}
|
||||
|
||||
func init() {
|
||||
flag.Parse()
|
||||
// flag.Parse()
|
||||
|
||||
if *PrintVersion {
|
||||
fmt.Println(Version)
|
||||
os.Exit(0)
|
||||
}
|
||||
// if *PrintVersion {
|
||||
// fmt.Println(Version)
|
||||
// os.Exit(0)
|
||||
// }
|
||||
|
||||
if *PrintHelp {
|
||||
printHelp()
|
||||
os.Exit(0)
|
||||
}
|
||||
// if *PrintHelp {
|
||||
// printHelp()
|
||||
// os.Exit(0)
|
||||
// }
|
||||
|
||||
if os.Getenv("SESSION_SECRET") != "" {
|
||||
SessionSecret = os.Getenv("SESSION_SECRET")
|
||||
|
||||
Reference in New Issue
Block a user