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

20
api/index.go Normal file
View File

@@ -0,0 +1,20 @@
package handler
import (
"net/http"
"sync"
"ds2api/internal/server"
)
var (
once sync.Once
app *server.App
)
func Handler(w http.ResponseWriter, r *http.Request) {
once.Do(func() {
app = server.NewApp()
})
app.Router.ServeHTTP(w, r)
}