MCPcopy Create free account

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

Functions10,891 in github.com/QuantumNous/new-api

↓ 933 callersMethodEqual
(other taskSnapshot)
model/task.go:467
↓ 799 callersFunctiont
(key: string)
web/src/features/system-settings/models/__tests__/group-auto-limit-validation.test.ts:23
↓ 656 callersFunctioncn
(...inputs: ClassValue[])
web/src/lib/utils.ts:22
↓ 366 callersMethodSet
(key K, value V)
types/rw_map.go:40
↓ 340 callersMethodContains
(item T)
types/set.go:21
↓ 265 callersMethodString
()
relay/channel/volcengine/protocols.go:55
↓ 204 callersMethodGet
(key K)
types/rw_map.go:33
↓ 196 callersMethodUnmarshal
(data []byte)
relay/channel/volcengine/protocols.go:306
↓ 194 callersMethodRun
(ctx context.Context, task *model.SystemTask, runnerID string)
service/system_task.go:36
↓ 179 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
↓ 172 callersMethodget
(rawProxyURL string, policy HTTPTransportPolicy)
service/http_client.go:199
↓ 163 callersMethodMarshal
()
relay/channel/volcengine/protocols.go:274
↓ 160 callersFunctionApiError
(c *gin.Context, err error)
common/gin.go:199
↓ 152 callersMethodLen
()
types/rw_map.go:70
↓ 144 callersMethodUnlock
()
controller/user.go:1342
↓ 138 callersFunctionSysLog
(s string)
common/sys_log.go:17
↓ 129 callersMethodError
()
controller/oauth.go:434
↓ 125 callersMethodAdd
(item T)
types/set.go:13
↓ 125 callersMethodReadAll
()
types/rw_map.go:60
↓ 123 callersFunctionUnmarshal
(data []byte, v any)
common/json.go:9
↓ 109 callersFunctionLogError
(ctx context.Context, msg string)
logger/logger.go:87
↓ 101 callersMethodQuery
(params QueryParams)
pkg/perf_metrics/types.go:7
↓ 99 callersMethodHeader
()
router/plugin-router.go:428
↓ 97 callersFunctionLogDebug
(ctx context.Context, msg string, args ...any)
logger/logger.go:91
↓ 96 callersFunctionGetTimestamp
()
common/utils.go:264
↓ 93 callersMethodCount
Count returns the deduplicated completed image output count before commit capping.
relay/common/tool_usage.go:138
↓ 91 callersMethodError
(context.Context, string, ...any)
model/user_session_migration_test.go:39
↓ 90 callersFunctionMarshal
(v any)
common/json.go:21
↓ 87 callersMethodError
()
oauth/types.go:37
↓ 84 callersMethodBytes
Bytes 获取全部内容
common/body_storage.go:18
↓ 83 callersFunctionApiSuccess
(c *gin.Context, data any)
common/gin.go:213
↓ 82 callersMethodRegister
(source string, options Options)
pkg/jsplugin/registry.go:201
↓ 79 callersMethodDo
(req *HTTPRequest)
pkg/ionet/types.go:16
↓ 76 callersMethodreset
reset clears the per-chunk stopped flag so the object can be reused.
relay/helper/stream_result.go:50
↓ 69 callersFunctionApplyParamOverride
(jsonData []byte, paramOverride map[string]interface{}, conditionContext map[string]interface{})
relay/common/override.go:143
↓ 68 callersFunctiontruncateTables
(t *testing.T)
model/task_cas_test.go:69
↓ 66 callersFunctionNewRegistry
()
pkg/jsplugin/registry.go:180
↓ 66 callersFunctionSysError
(s string)
common/sys_log.go:24
↓ 61 callersFunctiononChange
()
web/src/hooks/use-mobile.ts:28
↓ 60 callersFunctionNewError
(err error, errorCode ErrorCode, ops ...NewAPIErrorOptions)
relaykit/types/error.go:244
↓ 60 callersMethodNext
(fromServer []byte, more bool)
common/email_ntlm_auth.go:51
↓ 59 callersFunctionApiErrorMsg
(c *gin.Context, msg string)
common/gin.go:206
↓ 58 callersMethodDelete
()
model/user.go:906
↓ 57 callersMethodError
()
relay/common/override.go:81
↓ 57 callersFunctionassertJSONEqual
(t *testing.T, want, got string)
relay/common/override_test.go:2399
↓ 55 callersMethodClose
()
middleware/gzip.go:19
↓ 51 callersMethodClose
()
relay/channel/minimax/adaptor_test.go:127
↓ 51 callersFunctionCloseResponseBodyGracefully
(httpResponse *http.Response)
service/http.go:16
↓ 51 callersMethodGeneration
()
pkg/jsplugin/registry.go:591
↓ 51 callersMethodWrite
(b []byte)
middleware/audit.go:24
↓ 51 callersFunctiontruncate
--------------------------------------------------------------------------- Seed helpers -------------------------------------------------------------
service/task_billing_test.go:69
↓ 50 callersMethodOpen
(name string)
common/embed-file-system.go:26
↓ 50 callersFunctioncancel
(notify: boolean)
web/src/features/playground/hooks/use-stream-request.ts:169
↓ 49 callersFunctionNewOpenAIError
(err error, errorCode ErrorCode, statusCode int, ops ...NewAPIErrorOptions)
relaykit/types/error.go:266
↓ 47 callersMethodGet
Get 获取指定配置模块
setting/config/config.go:35
↓ 47 callersMethodInit
Init IsStream bool
relay/channel/adapter.go:19
↓ 47 callersFunctionLogWarn
(ctx context.Context, msg string, args ...any)
logger/logger.go:80
↓ 47 callersFunctionUnmarshal
(data []byte, v any)
relaykit/relayconvert/kitutil/json.go:14
↓ 46 callersFunctionMarshal
(v any)
relaykit/relayconvert/kitutil/json.go:26
↓ 46 callersMethodUpdate
()
model/task.go:489
↓ 45 callersFunctionLogInfo
(ctx context.Context, msg string)
logger/logger.go:76
↓ 43 callersFunctionExprHashString
ExprHashString returns the SHA-256 hex digest of an expression string.
pkg/billingexpr/types.go:82
↓ 43 callersMethodadd
(sample Sample)
pkg/perf_metrics/types.go:89
↓ 41 callersMethodExists
(prefix string, path string)
common/embed-file-system.go:18
↓ 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
↓ 40 callersMethodClose
()
controller/passkey_test.go:26
↓ 40 callersFunctionseedUser
(t *testing.T, id int, quota int)
service/task_billing_test.go:85
↓ 40 callersFunctionuseUpdateOption
()
web/src/features/system-settings/hooks/use-update-option.ts:42
↓ 39 callersMethodWriteHeader
(statusCode int)
router/plugin-router.go:435
↓ 38 callersMethodError
()
relaykit/types/error.go:123
↓ 37 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
↓ 37 callersMethodGetEstimatePromptTokens
()
relaykit/relayconvert/convmeta/meta.go:31
↓ 37 callersMethodSave
()
model/channel.go:345
↓ 36 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
↓ 36 callersFunctionmakeTask
(userId, channelId, quota, tokenId int, billingSource string, subscriptionId int)
service/task_billing_test.go:139
↓ 34 callersMethodWrite
(p []byte)
relay/channel/openai/image_stream_test.go:188
↓ 34 callersMethodWriteString
(s string)
relay/channel/openai/image_stream_test.go:196
↓ 33 callersMethodUnregister
(key string)
pkg/jsplugin/registry.go:535
↓ 32 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
↓ 32 callersFunctionGetUserById
(id int, selectAll bool)
model/user.go:493
↓ 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 callersFunctionStreamScannerHandler
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo, dataHandler func(data string, sr *StreamRes
relay/helper/stream_scanner.go:77
↓ 31 callersFunctionDoApiRequest
(a Adaptor, c *gin.Context, info *common.RelayInfo, requestBody io.Reader)
relay/channel/api_request.go:313
↓ 31 callersMethodGet
(platform string)
pkg/jsplugin/registry.go:441
↓ 31 callersMethodGetSetting
()
model/user.go:158
↓ 30 callersMethodCopy
()
relaykit/dto/openai_response.go:186
↓ 30 callersFunctionErrOptionWithSkipRetry
()
relaykit/types/error.go:381
↓ 30 callersFunctionInterface2String
(inter interface{})
relaykit/relayconvert/kitutil/value.go:16
↓ 30 callersFunctionclose
(open: boolean)
web/src/features/task-plugins/components/upload-dialog.tsx:85
↓ 30 callersFunctiongetUserQuota
--------------------------------------------------------------------------- Read-back helpers --------------------------------------------------------
service/task_billing_test.go:454
↓ 29 callersFunctionGetChannelById
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:431
↓ 29 callersMethodScan
(val interface{})
model/task.go:89
↓ 27 callersMethodRegister
Register 注册一个配置模块
setting/config/config.go:28
↓ 27 callersFunctionUnmarshalJsonStr
(data string, v any)
common/json.go:13
↓ 27 callersFunctionchannelActionConfig
( config: ApiRequestConfig = {} )
web/src/features/channels/api.ts:43
↓ 26 callersFunctionInitChannelCache
()
model/channel_cache.go:27
↓ 26 callersMethodStop
Stop records a fatal error and marks the stream to stop after this chunk.
relay/helper/stream_result.go:29
↓ 26 callersFunctionUsingMainDatabase
(databaseType DatabaseType)
common/database.go:36
↓ 26 callersFunctionadvancedCustomRelayInfo
(config *dto.AdvancedCustomConfig)
relay/channel/advancedcustom/adaptor_test.go:832
next →1–100 of 10,891, ranked by callers