MCPcopy Create free account

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

Functions11,918 in github.com/QuantumNous/new-api

↓ 1,157 callersMethodEqual
(other taskSnapshot)
model/task.go:488
↓ 840 callersFunctiont
(key: string)
web/src/features/system-settings/models/__tests__/group-auto-limit-validation.test.ts:23
↓ 657 callersFunctioncn
(...inputs: ClassValue[])
web/src/lib/utils.ts:22
↓ 408 callersMethodSet
(key K, value V)
types/rw_map.go:40
↓ 406 callersMethodContains
(item T)
types/set.go:21
↓ 346 callersMethodString
()
relay/channel/volcengine/protocols.go:55
↓ 285 callersMethodRun
(ctx context.Context, task *model.SystemTask, runnerID string)
service/system_task.go:36
↓ 222 callersMethodGet
(key K)
types/rw_map.go:33
↓ 202 callersMethodUnmarshal
(data []byte)
relay/channel/volcengine/protocols.go:306
↓ 198 callersMethodLen
()
types/rw_map.go:70
↓ 195 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
↓ 190 callersFunctionUnmarshal
(data []byte, v any)
common/json.go:11
↓ 189 callersMethodMarshal
()
relay/channel/volcengine/protocols.go:274
↓ 186 callersMethodEmpty
()
relaykit/relayconvert/internal/toolconv/model.go:97
↓ 179 callersMethodget
(rawProxyURL string, policy HTTPTransportPolicy)
service/http_client.go:222
↓ 167 callersFunctionMarshal
(v any)
common/json.go:35
↓ 155 callersMethodUnlock
()
controller/user.go:1214
↓ 152 callersMethodAdd
(item T)
types/set.go:13
↓ 147 callersMethodBytes
Bytes 获取全部内容
common/body_storage.go:18
↓ 137 callersMethodError
()
controller/oauth.go:557
↓ 130 callersFunctionSysLog
(s string)
common/sys_log.go:17
↓ 129 callersFunctionApiError
(c *gin.Context, err error)
common/gin.go:199
↓ 128 callersMethodReadAll
()
types/rw_map.go:60
↓ 124 callersMethodCount
Count returns the deduplicated completed image output count before commit capping.
relay/common/tool_usage.go:138
↓ 118 callersMethodHeader
()
router/plugin-router.go:428
↓ 114 callersMethodRegister
(source string, options Options)
pkg/jsplugin/registry.go:201
↓ 111 callersFunctionLogError
(ctx context.Context, msg string)
logger/logger.go:87
↓ 110 callersMethodQuery
(params QueryParams)
pkg/perf_metrics/types.go:7
↓ 103 callersFunctionApiSuccess
(c *gin.Context, data any)
common/gin.go:213
↓ 100 callersFunctionGetTimestamp
()
common/utils.go:264
↓ 98 callersMethodreset
reset clears the per-chunk stopped flag so the object can be reused.
relay/helper/stream_result.go:50
↓ 97 callersFunctionLogDebug
(ctx context.Context, msg string, args ...any)
logger/logger.go:91
↓ 97 callersFunctionUnmarshal
(data []byte, v any)
relaykit/relayconvert/kitutil/json.go:14
↓ 93 callersMethodError
()
model/vendor_management.go:22
↓ 91 callersMethodUpdate
()
model/task.go:514
↓ 90 callersMethodError
()
oauth/types.go:38
↓ 90 callersFunctionMarshal
(v any)
relaykit/relayconvert/kitutil/json.go:26
↓ 80 callersMethodDo
(req *HTTPRequest)
pkg/ionet/types.go:16
↓ 71 callersFunctionSysError
(s string)
common/sys_log.go:24
↓ 70 callersFunctiontruncateTables
(t *testing.T)
model/task_cas_test.go:69
↓ 69 callersFunctionApplyParamOverride
(jsonData []byte, paramOverride map[string]interface{}, conditionContext map[string]interface{})
relay/common/override.go:144
↓ 69 callersFunctionNewRegistry
()
pkg/jsplugin/registry.go:180
↓ 68 callersFunctionApiErrorMsg
(c *gin.Context, msg string)
common/gin.go:206
↓ 68 callersMethodDelete
()
model/user.go:956
↓ 64 callersFunctionNewError
(err error, errorCode ErrorCode, ops ...NewAPIErrorOptions)
relaykit/types/error.go:244
↓ 64 callersMethodfrom
( error: unknown, fallback = 'Verification failed. Please try again.' )
web/src/lib/secure-verification.ts:33
↓ 63 callersMethodNext
(fromServer []byte, more bool)
common/email_ntlm_auth.go:51
↓ 62 callersMethodClose
()
middleware/gzip.go:19
↓ 62 callersMethodError
()
relay/common/override.go:82
↓ 61 callersFunctiononChange
()
web/src/hooks/use-mobile.ts:28
↓ 61 callersFunctionsetupSecurityEnrollmentTest
(t *testing.T)
controller/security_enrollment_test.go:42
↓ 58 callersMethodOpen
(name string)
common/embed-file-system.go:26
↓ 58 callersFunctioncancel
(notify: boolean)
web/src/features/playground/hooks/use-stream-request.ts:169
↓ 57 callersFunctionassertJSONEqual
(t *testing.T, want, got string)
relay/common/override_test.go:2399
↓ 55 callersMethodClose
()
relay/channel/minimax/adaptor_test.go:127
↓ 55 callersMethodGeneration
()
pkg/jsplugin/registry.go:591
↓ 55 callersFunctionsecurityEnrollmentRequest
(method, path, body, proof string, identity service.AuthIdentity, handler gin.HandlerFunc)
controller/security_enrollment_test.go:105
↓ 54 callersMethodWrite
(b []byte)
middleware/audit.go:25
↓ 53 callersFunctionLogWarn
(ctx context.Context, msg string, args ...any)
logger/logger.go:80
↓ 53 callersFunctiontruncate
--------------------------------------------------------------------------- Seed helpers -------------------------------------------------------------
service/task_billing_test.go:69
↓ 52 callersMethodInit
Init IsStream bool
relay/channel/adapter.go:19
↓ 52 callersFunctionNewOpenAIError
(err error, errorCode ErrorCode, statusCode int, ops ...NewAPIErrorOptions)
relaykit/types/error.go:266
↓ 51 callersFunctionCloseResponseBodyGracefully
(httpResponse *http.Response)
service/http.go:16
↓ 50 callersFunctionGetUserById
(id int, selectAll bool)
model/user.go:521
↓ 49 callersMethodGet
Get 获取指定配置模块
setting/config/config.go:35
↓ 48 callersMethodClose
()
controller/passkey_test.go:26
↓ 46 callersFunctionInterface2String
(inter interface{})
relaykit/relayconvert/kitutil/value.go:16
↓ 46 callersFunctionrender
()
web/src/components/turnstile.tsx:45
↓ 45 callersFunctionLogInfo
(ctx context.Context, msg string)
logger/logger.go:76
↓ 45 callersFunctionUnmarshalJsonStr
(data string, v any)
common/json.go:15
↓ 44 callersFunctionExprHashString
ExprHashString returns the SHA-256 hex digest of an expression string.
pkg/billingexpr/types.go:82
↓ 44 callersMethodScan
(val interface{})
model/task.go:89
↓ 43 callersMethodExists
(prefix string, path string)
common/embed-file-system.go:18
↓ 43 callersMethodWriteString
(s string)
relay/channel/openai/image_stream_test.go:196
↓ 43 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
↓ 42 callersMethodWriteHeader
(statusCode int)
router/plugin-router.go:435
↓ 42 callersMethoddelete
(identity *AuthSessionIdentity)
model/user.go:965
↓ 42 callersFunctionseedUser
(t *testing.T, id int, quota int)
service/task_billing_test.go:85
↓ 41 callersFunctionRunExpr
RunExpr compiles (with cache) and executes an expression string. The environment exposes: - p, c — prompt / completion tokens (auto-exclud
pkg/billingexpr/run.go:24
↓ 41 callersFunctionwriteSecurityOperationError
writeSecurityOperationError only exposes known, fixed business messages. Unexpected errors retain their cause for the existing server-side auth logger
controller/secure_verification.go:32
↓ 39 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:39
↓ 39 callersMethodGetEstimatePromptTokens
()
relaykit/relayconvert/convmeta/meta.go:35
↓ 39 callersMethodWrite
(p []byte)
relay/channel/openai/image_stream_test.go:188
↓ 39 callersFunctionuseUpdateOption
()
web/src/features/system-settings/hooks/use-update-option.ts:42
↓ 38 callersFunctionDecodeJson
(reader io.Reader, v any)
common/json.go:19
↓ 38 callersMethodadd
(sample Sample)
pkg/perf_metrics/types.go:89
↓ 38 callersFunctionclose
(open: boolean)
web/src/features/task-plugins/components/upload-dialog.tsx:85
↓ 38 callersFunctionmakeTask
(userId, channelId, quota, tokenId int, billingSource string, subscriptionId int)
service/task_billing_test.go:139
↓ 36 callersMethodUnregister
(key string)
pkg/jsplugin/registry.go:535
↓ 35 callersFunctionApiErrorI18n
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
↓ 35 callersMethodSave
()
model/channel.go:350
↓ 33 callersMethodRemove
(item T)
types/set.go:17
↓ 33 callersFunctionStreamScannerHandler
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo, dataHandler func(data string, sr *StreamRes
relay/helper/stream_scanner.go:77
↓ 32 callersMethodCopy
()
relaykit/dto/openai_response.go:191
↓ 32 callersFunctionErrOptionWithSkipRetry
()
relaykit/types/error.go:381
↓ 32 callersMethodReplaceOverrides
ReplaceOverrides atomically publishes a complete override layer.
pkg/jsplugin/registry.go:559
↓ 32 callersFunctionSetupApiRequestHeader
(info *common.RelayInfo, c *gin.Context, req *http.Header)
relay/channel/api_request.go:51
↓ 32 callersFunctiongetUserQuota
--------------------------------------------------------------------------- Read-back helpers --------------------------------------------------------
service/task_billing_test.go:454
↓ 31 callersMethodCall
Call invokes one named module export and returns its JSON-compatible value.
pkg/jsplugin/engine.go:301
↓ 31 callersFunctionDoApiRequest
(a Adaptor, c *gin.Context, info *common.RelayInfo, requestBody io.Reader)
relay/channel/api_request.go:313
next →1–100 of 11,918, ranked by callers