MCPcopy Create free account

hub / github.com/QuantumNous/new-api / functions

Functions12,901 in github.com/QuantumNous/new-api

↓ 1,405 callersMethodEqual
(other taskSnapshot)
model/task.go:512
↓ 910 callersFunctiont
(key: string)
web/src/features/system-settings/models/__tests__/group-auto-limit-validation.test.ts:23
↓ 671 callersFunctioncn
(...inputs: ClassValue[])
web/src/lib/utils.ts:22
↓ 496 callersMethodContains
(item T)
types/set.go:21
↓ 493 callersMethodSet
(key K, value V)
types/rw_map.go:40
↓ 439 callersMethodRun
(ctx context.Context, task *model.SystemTask, runnerID string)
service/system_task.go:36
↓ 393 callersMethodString
()
relay/channel/volcengine/protocols.go:55
↓ 258 callersMethodLen
()
types/rw_map.go:70
↓ 246 callersMethodGet
(key K)
types/rw_map.go:33
↓ 241 callersMethodNewReader
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
↓ 233 callersMethodEmpty
()
relaykit/relayconvert/internal/toolconv/model.go:97
↓ 228 callersFunctionUnmarshal
(data []byte, v any)
common/json.go:42
↓ 226 callersMethodUnmarshal
(data []byte, v any)
relaykit/relayconvert/kitutil/json.go:19
↓ 211 callersMethodMarshal
(v any)
relaykit/relayconvert/kitutil/json.go:18
↓ 208 callersFunctionMarshal
(v any)
common/json.go:66
↓ 197 callersMethodget
(rawProxyURL string, policy HTTPTransportPolicy)
service/http_client.go:222
↓ 191 callersMethodUnlock
()
controller/user.go:1216
↓ 184 callersFunctionhandleServerError
( error: unknown, fallbackMessage?: string, presentation?: { title: string; description?: string } )
web/src/lib/handle-server-error.ts:34
↓ 176 callersMethodBytes
Bytes 获取全部内容
common/body_storage.go:18
↓ 174 callersMethodAdd
(item T)
types/set.go:13
↓ 164 callersMethodparse
()
web/src/features/pricing/lib/billing-expression/parser.ts:220
↓ 155 callersMethodError
()
controller/oauth.go:604
↓ 139 callersMethodReadAll
()
types/rw_map.go:60
↓ 137 callersMethodRegister
(source string, options Options)
pkg/jsplugin/registry.go:265
↓ 136 callersFunctionApiError
(c *gin.Context, err error)
common/gin.go:199
↓ 135 callersFunctionSysLog
(s string)
common/sys_log.go:17
↓ 132 callersMethodCount
Count returns the deduplicated completed image output count before commit capping.
relay/common/tool_usage.go:138
↓ 120 callersFunctionrender
()
web/src/components/turnstile.tsx:45
↓ 112 callersMethodQuery
(params QueryParams)
pkg/perf_metrics/types.go:7
↓ 111 callersFunctionLogError
(ctx context.Context, msg string)
logger/logger.go:87
↓ 109 callersMethodUpdate
()
model/task.go:538
↓ 108 callersFunctionApiSuccess
(c *gin.Context, data any)
common/gin.go:213
↓ 107 callersFunctionUnmarshal
(data []byte, v any)
relaykit/relayconvert/kitutil/json.go:58
↓ 105 callersMethodreset
reset clears the per-chunk stopped flag so the object can be reused.
relay/helper/stream_result.go:55
↓ 100 callersFunctionGetTimestamp
()
common/utils.go:264
↓ 100 callersFunctionMarshal
(v any)
relaykit/relayconvert/kitutil/json.go:70
↓ 98 callersMethodError
()
model/vendor_management.go:22
↓ 96 callersFunctionLogDebug
(ctx context.Context, msg string, args ...any)
logger/logger.go:91
↓ 92 callersMethodError
()
oauth/types.go:38
↓ 91 callersMethodDo
(req *HTTPRequest)
pkg/ionet/types.go:16
↓ 81 callersMethodDelete
()
model/user.go:956
↓ 81 callersFunctionsetupSecurityEnrollmentTest
(t *testing.T)
controller/security_enrollment_test.go:42
↓ 75 callersFunctionNewRegistry
()
pkg/jsplugin/registry.go:245
↓ 74 callersMethodClose
()
middleware/gzip.go:19
↓ 74 callersMethodInit
Init IsStream bool
relay/channel/adapter.go:19
↓ 74 callersFunctionSysError
(s string)
common/sys_log.go:24
↓ 73 callersMethodfrom
( error: unknown, fallback = 'Verification failed. Please try again.' )
web/src/lib/secure-verification.ts:37
↓ 73 callersMethodstring
(node: ExpressionNode)
web/src/features/pricing/lib/billing-expression/runtime.ts:325
↓ 72 callersFunctiontruncateTables
(t *testing.T)
model/task_cas_test.go:69
↓ 71 callersMethodHeader
()
router/plugin-router.go:428
↓ 71 callersFunctionNewError
(err error, errorCode ErrorCode, ops ...NewAPIErrorOptions)
relaykit/types/error.go:244
↓ 71 callersMethodclear
clear releases the whole request chain when its key expires.
common/rate-limit.go:56
↓ 69 callersFunctionApiErrorMsg
(c *gin.Context, msg string)
common/gin.go:206
↓ 69 callersFunctionApplyParamOverride
(jsonData []byte, paramOverride map[string]any, conditionContext map[string]any)
relay/common/override.go:146
↓ 69 callersFunctioncancel
()
web/src/features/system-update/api.ts:38
↓ 68 callersMethodCopy
()
relaykit/dto/openai_response.go:191
↓ 67 callersMethodClose
()
controller/passkey_test.go:757
↓ 66 callersMethodNext
(fromServer []byte, more bool)
common/email_ntlm_auth.go:51
↓ 65 callersFunctionrequireServerSuccess
(response: T)
web/src/lib/server-error-message.ts:208
↓ 64 callersMethodGeneration
()
pkg/jsplugin/registry.go:629
↓ 63 callersMethodHeader
()
controller/responses_websocket.go:62
↓ 63 callersMethodOpen
(name string)
common/embed-file-system.go:26
↓ 62 callersMethodClose
()
relay/channel/minimax/adaptor_test.go:127
↓ 62 callersMethodError
()
relay/common/override.go:84
↓ 61 callersFunctionsecurityEnrollmentRequest
(method, path, body, proof string, identity service.AuthIdentity, handler gin.HandlerFunc)
controller/security_enrollment_test.go:105
↓ 58 callersFunctionLogWarn
(ctx context.Context, msg string, args ...any)
logger/logger.go:80
↓ 58 callersMethodScan
(val any)
model/task.go:89
↓ 57 callersFunctionassertJSONEqual
(t *testing.T, want, got string)
relay/common/override_test.go:2399
↓ 56 callersFunctionNewOpenAIError
(err error, errorCode ErrorCode, statusCode int, ops ...NewAPIErrorOptions)
relaykit/types/error.go:266
↓ 56 callersFunctioncreateServerError
(value: unknown, fallback?: string)
web/src/lib/server-error-message.ts:201
↓ 55 callersFunctiontruncate
--------------------------------------------------------------------------- Seed helpers -------------------------------------------------------------
service/task_billing_test.go:70
↓ 54 callersMethodGet
Get 获取指定配置模块
setting/config/config.go:35
↓ 54 callersFunctiononChange
()
web/src/hooks/use-mobile.ts:28
↓ 53 callersMethodCall
Call invokes one named module export and returns its JSON-compatible value.
pkg/jsplugin/engine.go:298
↓ 53 callersFunctionUnmarshalJsonStr
(data string, v any)
common/json.go:46
↓ 53 callersMethodWriteString
(s string)
relay/channel/openai/image_stream_test.go:306
↓ 52 callersFunctionclose
(open: boolean)
web/src/features/task-plugins/components/upload-dialog.tsx:141
↓ 51 callersFunctionCloseResponseBodyGracefully
(httpResponse *http.Response)
service/http.go:16
↓ 50 callersFunctionGetUserById
(id int, selectAll bool)
model/user.go:521
↓ 50 callersMethodboolean
(node: ExpressionNode)
web/src/features/pricing/lib/billing-expression/runtime.ts:301
↓ 49 callersFunctionExprHashString
ExprHashString returns the SHA-256 hex digest of an expression string.
pkg/billingexpr/types.go:107
↓ 49 callersFunctionInterface2String
(inter any)
relaykit/relayconvert/kitutil/value.go:16
↓ 49 callersMethodadd
(sample Sample)
pkg/perf_metrics/types.go:111
↓ 48 callersFunctionErrOptionWithSkipRetry
()
relaykit/types/error.go:381
↓ 46 callersMethodExists
(prefix string, path string)
common/embed-file-system.go:18
↓ 46 callersFunctionLogInfo
(ctx context.Context, msg string)
logger/logger.go:76
↓ 45 callersFunctionRunExpr
RunExpr compiles (with cache) and executes an expression string. The environment exposes: - p, c — prompt / completion tokens (auto-exclud
pkg/billingexpr/run.go:26
↓ 45 callersMethodUnregister
(key string)
pkg/jsplugin/registry.go:581
↓ 45 callersMethodWrite
(p []byte)
relay/channel/openai/image_stream_test.go:298
↓ 45 callersFunctionlockForUpdate
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
↓ 44 callersMethodDone
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:44
↓ 44 callersMethoddelete
(identity *AuthSessionIdentity)
model/user.go:965
↓ 44 callersFunctionwriteSecurityOperationError
writeSecurityOperationError only exposes known, fixed business messages. Unexpected errors retain their cause for the existing server-side auth logger
controller/secure_verification.go:38
↓ 43 callersFunctionDecodeJson
(reader io.Reader, v any)
common/json.go:50
↓ 43 callersFunctioncleanup
()
web/src/features/auth/lib/oauth-popup.ts:66
↓ 43 callersFunctionseedUser
(t *testing.T, id int, quota int)
service/task_billing_test.go:86
↓ 42 callersFunctionSetContextKey
(c *gin.Context, key constant.ContextKey, value any)
common/gin.go:157
↓ 41 callersMethodGetEstimatePromptTokens
()
relaykit/relayconvert/convmeta/meta.go:35
↓ 41 callersFunctionNewErrorWithStatusCode
(err error, errorCode ErrorCode, statusCode int, ops ...NewAPIErrorOptions)
relaykit/types/error.go:299
↓ 40 callersFunctionNew
(plugin *pluginruntime.LoadedPlugin)
relay/channel/task/jsplugin/adaptor.go:92
next →1–100 of 12,901, ranked by callers