feat: Introduce a new Go-based DeepSeek API proxy with adapters for Claude and OpenAI, including SSE parsing and updated build configurations.

This commit is contained in:
CJACK
2026-02-15 19:50:26 +08:00
parent 35b99cdf4c
commit a50e2ef5cd
31 changed files with 4019 additions and 64 deletions

23
cmd/ds2api/main.go Normal file
View File

@@ -0,0 +1,23 @@
package main
import (
"net/http"
"os"
"strings"
"ds2api/internal/config"
"ds2api/internal/server"
)
func main() {
app := server.NewApp()
port := strings.TrimSpace(os.Getenv("PORT"))
if port == "" {
port = "5001"
}
config.Logger.Info("starting ds2api", "port", port)
if err := http.ListenAndServe("0.0.0.0:"+port, app.Router); err != nil {
config.Logger.Error("server stopped", "error", err)
os.Exit(1)
}
}