mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-05 00:45:29 +08:00
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:
20
api/index.go
Normal file
20
api/index.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user