Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
11,560 in github.com/QuantumNous/new-api
⨍
Functions
11,560
◇
Types & classes
1,706
↓ 1,070 callers
Method
Equal
(other taskSnapshot)
model/task.go:488
↓ 800 callers
Function
t
(key: string)
web/src/features/system-settings/models/__tests__/group-auto-limit-validation.test.ts:23
↓ 656 callers
Function
cn
(...inputs: ClassValue[])
web/src/lib/utils.ts:22
↓ 390 callers
Method
Set
(key K, value V)
types/rw_map.go:40
↓ 364 callers
Method
Contains
(item T)
types/set.go:21
↓ 281 callers
Method
String
()
relay/channel/volcengine/protocols.go:55
↓ 222 callers
Method
Run
(ctx context.Context, task *model.SystemTask, runnerID string)
service/system_task.go:36
↓ 207 callers
Method
Get
(key K)
types/rw_map.go:33
↓ 203 callers
Method
Unmarshal
(data []byte)
relay/channel/volcengine/protocols.go:306
↓ 187 callers
Method
NewReader
NewReader returns an independent reader positioned at the start of the stored payload. Each call returns a reader with its own cursor, so callers (e.g
common/body_storage.go:29
↓ 182 callers
Method
Marshal
()
relay/channel/volcengine/protocols.go:274
↓ 172 callers
Method
get
(rawProxyURL string, policy HTTPTransportPolicy)
service/http_client.go:222
↓ 171 callers
Method
Len
()
types/rw_map.go:70
↓ 167 callers
Method
Empty
()
relaykit/relayconvert/internal/toolconv/model.go:97
↓ 160 callers
Function
ApiError
(c *gin.Context, err error)
common/gin.go:199
↓ 148 callers
Method
Unlock
()
controller/user.go:1372
↓ 138 callers
Function
SysLog
(s string)
common/sys_log.go:17
↓ 132 callers
Method
Error
()
controller/oauth.go:434
↓ 132 callers
Function
Unmarshal
(data []byte, v any)
common/json.go:9
↓ 127 callers
Method
Add
(item T)
types/set.go:13
↓ 127 callers
Method
ReadAll
()
types/rw_map.go:60
↓ 110 callers
Function
LogError
(ctx context.Context, msg string)
logger/logger.go:87
↓ 102 callers
Method
Header
()
router/plugin-router.go:428
↓ 102 callers
Function
Marshal
(v any)
common/json.go:21
↓ 101 callers
Method
Query
(params QueryParams)
pkg/perf_metrics/types.go:7
↓ 97 callers
Function
GetTimestamp
()
common/utils.go:264
↓ 97 callers
Function
LogDebug
(ctx context.Context, msg string, args ...any)
logger/logger.go:91
↓ 97 callers
Function
Unmarshal
(data []byte, v any)
relaykit/relayconvert/kitutil/json.go:14
↓ 96 callers
Method
Count
Count returns the deduplicated completed image output count before commit capping.
relay/common/tool_usage.go:138
↓ 95 callers
Method
Bytes
Bytes 获取全部内容
common/body_storage.go:18
↓ 95 callers
Method
Error
(context.Context, string, ...any)
model/user_session_migration_test.go:39
↓ 92 callers
Method
Register
(source string, options Options)
pkg/jsplugin/registry.go:201
↓ 90 callers
Function
Marshal
(v any)
relaykit/relayconvert/kitutil/json.go:26
↓ 87 callers
Method
Error
()
oauth/types.go:37
↓ 84 callers
Function
ApiSuccess
(c *gin.Context, data any)
common/gin.go:213
↓ 79 callers
Method
Do
(req *HTTPRequest)
pkg/ionet/types.go:16
↓ 76 callers
Method
reset
reset clears the per-chunk stopped flag so the object can be reused.
relay/helper/stream_result.go:50
↓ 70 callers
Function
truncateTables
(t *testing.T)
model/task_cas_test.go:69
↓ 69 callers
Function
ApplyParamOverride
(jsonData []byte, paramOverride map[string]interface{}, conditionContext map[string]interface{})
relay/common/override.go:144
↓ 69 callers
Function
NewRegistry
()
pkg/jsplugin/registry.go:180
↓ 69 callers
Function
SysError
(s string)
common/sys_log.go:24
↓ 64 callers
Function
NewError
(err error, errorCode ErrorCode, ops ...NewAPIErrorOptions)
relaykit/types/error.go:244
↓ 62 callers
Method
Error
()
relay/common/override.go:82
↓ 61 callers
Function
onChange
()
web/src/hooks/use-mobile.ts:28
↓ 60 callers
Method
Close
()
middleware/gzip.go:19
↓ 60 callers
Method
Next
(fromServer []byte, more bool)
common/email_ntlm_auth.go:51
↓ 59 callers
Function
ApiErrorMsg
(c *gin.Context, msg string)
common/gin.go:206
↓ 59 callers
Method
Delete
()
model/user.go:906
↓ 58 callers
Method
Open
(name string)
common/embed-file-system.go:26
↓ 57 callers
Function
assertJSONEqual
(t *testing.T, want, got string)
relay/common/override_test.go:2399
↓ 55 callers
Method
Close
()
relay/channel/minimax/adaptor_test.go:127
↓ 53 callers
Method
Generation
()
pkg/jsplugin/registry.go:591
↓ 53 callers
Function
LogWarn
(ctx context.Context, msg string, args ...any)
logger/logger.go:80
↓ 53 callers
Function
truncate
--------------------------------------------------------------------------- Seed helpers -------------------------------------------------------------
service/task_billing_test.go:69
↓ 52 callers
Method
Init
Init IsStream bool
relay/channel/adapter.go:19
↓ 52 callers
Function
NewOpenAIError
(err error, errorCode ErrorCode, statusCode int, ops ...NewAPIErrorOptions)
relaykit/types/error.go:266
↓ 51 callers
Function
CloseResponseBodyGracefully
(httpResponse *http.Response)
service/http.go:16
↓ 51 callers
Method
Write
(b []byte)
middleware/audit.go:24
↓ 50 callers
Function
cancel
(notify: boolean)
web/src/features/playground/hooks/use-stream-request.ts:169
↓ 49 callers
Method
Get
Get 获取指定配置模块
setting/config/config.go:35
↓ 46 callers
Function
Interface2String
(inter interface{})
relaykit/relayconvert/kitutil/value.go:16
↓ 46 callers
Method
Update
()
model/task.go:514
↓ 45 callers
Function
LogInfo
(ctx context.Context, msg string)
logger/logger.go:76
↓ 44 callers
Function
ExprHashString
ExprHashString returns the SHA-256 hex digest of an expression string.
pkg/billingexpr/types.go:82
↓ 43 callers
Method
WriteString
(s string)
relay/channel/openai/image_stream_test.go:196
↓ 43 callers
Method
add
(sample Sample)
pkg/perf_metrics/types.go:89
↓ 42 callers
Method
Exists
(prefix string, path string)
common/embed-file-system.go:18
↓ 42 callers
Function
seedUser
(t *testing.T, id int, quota int)
service/task_billing_test.go:85
↓ 41 callers
Method
Close
()
controller/passkey_test.go:26
↓ 41 callers
Function
RunExpr
RunExpr compiles (with cache) and executes an expression string. The environment exposes: - p, c — prompt / completion tokens (auto-exclud
pkg/billingexpr/run.go:24
↓ 40 callers
Function
useUpdateOption
()
web/src/features/system-settings/hooks/use-update-option.ts:42
↓ 39 callers
Method
GetEstimatePromptTokens
()
relaykit/relayconvert/convmeta/meta.go:35
↓ 39 callers
Method
Write
(p []byte)
relay/channel/openai/image_stream_test.go:188
↓ 39 callers
Method
WriteHeader
(statusCode int)
router/plugin-router.go:435
↓ 38 callers
Function
makeTask
(userId, channelId, quota, tokenId int, billingSource string, subscriptionId int)
service/task_billing_test.go:139
↓ 37 callers
Method
Save
()
model/channel.go:350
↓ 37 callers
Method
Scan
(val interface{})
model/task.go:89
↓ 36 callers
Method
Done
Done signals that the handler has finished processing normally (e.g., Dify "message_end"). The stream stops after this chunk.
relay/helper/stream_result.go:39
↓ 36 callers
Function
lockForUpdate
lockForUpdate makes the next query emit SELECT ... FOR UPDATE so the matched rows stay locked until the surrounding transaction ends. GORM v2 silentl
model/locking.go:20
↓ 35 callers
Method
Unregister
(key string)
pkg/jsplugin/registry.go:535
↓ 33 callers
Function
ApiErrorI18n
ApiErrorI18n returns a translated error message based on the user's language preference key is the i18n message key, args is optional template data
common/gin.go:223
↓ 33 callers
Function
StreamScannerHandler
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo, dataHandler func(data string, sr *StreamRes
relay/helper/stream_scanner.go:77
↓ 32 callers
Method
Copy
()
relaykit/dto/openai_response.go:191
↓ 32 callers
Function
ErrOptionWithSkipRetry
()
relaykit/types/error.go:381
↓ 32 callers
Function
GetUserById
(id int, selectAll bool)
model/user.go:493
↓ 32 callers
Method
ReplaceOverrides
ReplaceOverrides atomically publishes a complete override layer.
pkg/jsplugin/registry.go:559
↓ 32 callers
Function
SetupApiRequestHeader
(info *common.RelayInfo, c *gin.Context, req *http.Header)
relay/channel/api_request.go:51
↓ 32 callers
Function
getUserQuota
--------------------------------------------------------------------------- Read-back helpers --------------------------------------------------------
service/task_billing_test.go:454
↓ 31 callers
Method
Call
Call invokes one named module export and returns its JSON-compatible value.
pkg/jsplugin/engine.go:301
↓ 31 callers
Function
DoApiRequest
(a Adaptor, c *gin.Context, info *common.RelayInfo, requestBody io.Reader)
relay/channel/api_request.go:313
↓ 31 callers
Method
Get
(platform string)
pkg/jsplugin/registry.go:441
↓ 31 callers
Method
GetSetting
()
model/user.go:158
↓ 31 callers
Function
UnmarshalJsonStr
(data string, v any)
common/json.go:13
↓ 30 callers
Method
Error
()
relaykit/types/error.go:123
↓ 29 callers
Function
GetChannelById
GetChannelById loads a channel directly from the database, bypassing the in-memory channel cache. WARNING: do NOT call this on request hot paths (mid
model/channel.go:436
↓ 29 callers
Function
InitChannelCache
()
model/channel_cache.go:27
↓ 29 callers
Method
SetPublic
SetPublic records metadata that log owners may receive from self/token log APIs. It rejects role-scoped and legacy-sensitive keys so new writers canno
model/log_other.go:60
↓ 29 callers
Function
close
(open: boolean)
web/src/features/task-plugins/components/upload-dialog.tsx:85
↓ 28 callers
Function
New
(plugin *pluginruntime.LoadedPlugin)
relay/channel/task/jsplugin/adaptor.go:90
↓ 27 callers
Method
Register
Register 注册一个配置模块
setting/config/config.go:28
next →
1–100 of 11,560, ranked by callers