feat: publish sanitized custom.97 source

This commit is contained in:
cneicy committed 2026-10-27 20:43:39 +08:00
1 parent 8e6ed0317b
commit 86c0276156
1022 files changed
+69903 -19207

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
package dto
import (
"encoding/json"
"net/http"
"github.com/QuantumNous/new-api/relaykit/types"
)
// DeepSeekToolsRequest is a DeepSeek Search or Fetch API request
// (/v1/tools/search, /v1/tools/fetch). The body names no model; Model holds
// the routing name. RawBody preserves the original JSON so the body is
// forwarded with unknown fields intact.
type DeepSeekToolsRequest struct {
Model string `json:"model,omitempty"`
RawBody json.RawMessage `json:"-"`
}
func (r *DeepSeekToolsRequest) GetTokenCountMeta() *types.TokenCountMeta {
return &types.TokenCountMeta{
CombineText: string(r.RawBody),
TokenType: types.TokenTypeTokenizer,
}
}
func (r *DeepSeekToolsRequest) IsStream(_ *http.Request) bool {
return false
}
func (r *DeepSeekToolsRequest) SetModelName(modelName string) {
if modelName != "" {
r.Model = modelName
}
}