增加调试前端页面
This commit is contained in:
1 parent
3080b17d02
commit
ee9d2d7cf1
22 files changed
+1442
-59
No files matched your search
@@ -13,6 +13,7 @@ type healthResponse struct {
|
||||
// RouterOptions contains optional handlers wired by the application layer.
|
||||
type RouterOptions struct {
|
||||
Chat http.Handler
|
||||
ChatPage http.Handler
|
||||
DashScopeChat http.Handler
|
||||
MCP http.Handler
|
||||
}
|
||||
@@ -25,6 +26,10 @@ func NewRouter(options ...RouterOptions) http.Handler {
|
||||
if options[0].Chat != nil {
|
||||
mux.Handle("/api/chat", options[0].Chat)
|
||||
}
|
||||
if options[0].ChatPage != nil {
|
||||
mux.Handle("GET /chat", http.RedirectHandler("/chat/", http.StatusPermanentRedirect))
|
||||
mux.Handle("GET /chat/", options[0].ChatPage)
|
||||
}
|
||||
if options[0].DashScopeChat != nil {
|
||||
mux.Handle("/api/v1/apps/{app_id}/completion", options[0].DashScopeChat)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user