Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
15,592 in github.com/QuantumNous/new-api
⨍
Functions
15,592
◇
Types & classes
2,267
↓ 1,736 callers
Method
Equal
(other taskSnapshot)
model/task.go:546
↓ 1,004 callers
Function
t
(key: string)
web/src/features/system-settings/models/__tests__/group-auto-limit-validation.test.ts:23
↓ 776 callers
Method
Run
(ctx context.Context, task *model.SystemTask, runnerID string)
service/system_task.go:36
↓ 716 callers
Method
Contains
(item T)
types/set.go:21
↓ 696 callers
Method
Set
(key K, value V)
types/rw_map.go:40
↓ 694 callers
Function
cn
(...inputs: ClassValue[])
web/src/lib/utils.ts:22
↓ 571 callers
Method
String
()
relay/channel/volcengine/protocols.go:55
↓ 447 callers
Method
Len
()
types/rw_map.go:70
↓ 444 callers
Method
Get
(key K)
types/rw_map.go:33
↓ 370 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:33
↓ 358 callers
Method
Empty
()
relaykit/relayconvert/internal/toolconv/model.go:102
↓ 317 callers
Function
LogText
LogText formats a server log line in the language of DEFAULT_LANGUAGE. format is the English text and the key of its translation in log_text.zh-CN.jso
common/log_text.go:30
↓ 295 callers
Method
push
push queues an admitted job without waiting; a full queue drops it.
relay/requestplugin/report.go:479
↓ 287 callers
Method
Marshal
(v any)
relaykit/relayconvert/kitutil/json.go:18
↓ 285 callers
Method
Equal
Equal reports whether the scope holds the same models and channel types, in any order.
setting/request_plugin_setting/config.go:102
↓ 282 callers
Method
Add
(item T)
types/set.go:13
↓ 274 callers
Method
Unmarshal
(data []byte, v any)
relaykit/relayconvert/kitutil/json.go:19
↓ 267 callers
Method
Unlock
()
controller/user.go:1267
↓ 266 callers
Function
Unmarshal
(data []byte, v any)
common/json.go:47
↓ 258 callers
Method
Bytes
Bytes returns read-only contents. Store edits in a new BodyStorage; decoded strings and raw JSON may still refer to these bytes.
common/body_storage.go:22
↓ 258 callers
Function
Marshal
(v any)
common/json.go:94
↓ 219 callers
Method
get
(rawProxyURL string, policy HTTPTransportPolicy)
service/http_client.go:230
↓ 197 callers
Method
Register
(source string, options Options)
pkg/jsplugin/registry.go:82
↓ 192 callers
Method
ReadAll
()
types/rw_map.go:60
↓ 188 callers
Function
handleServerError
( error: unknown, fallbackMessage?: string, presentation?: { title: string; description?: string } )
web/src/lib/handle-server-error.ts:34
↓ 188 callers
Method
parse
()
web/src/features/pricing/lib/billing-expression/parser.ts:220
↓ 180 callers
Method
find
find returns the distinct keywords in text, as the list spells them, in the order they first end in text; at most limit.
pluginkit/keywords.go:108
↓ 180 callers
Function
render
()
web/src/components/turnstile.tsx:45
↓ 168 callers
Method
Error
()
controller/oauth.go:595
↓ 158 callers
Method
Count
Count returns the deduplicated completed image output count before commit capping.
relay/common/tool_usage.go:188
↓ 155 callers
Function
ApiError
ApiError responds with err's text. When err is or wraps a *Message, the response also carries message_key and message_params for the web console.
common/gin.go:279
↓ 155 callers
Method
has
(name string)
pluginkit/config_schema.go:727
↓ 149 callers
Method
Update
()
model/task.go:572
↓ 144 callers
Function
NewMessage
(key string, params ...map[string]any)
common/message.go:20
↓ 142 callers
Function
SysLog
(s string)
common/sys_log.go:41
↓ 138 callers
Method
Query
(params QueryParams)
pkg/perf_metrics/types.go:7
↓ 134 callers
Method
post
(t *testing.T, path, body string)
router/provider_plugin_relay_test.go:192
↓ 133 callers
Function
Unmarshal
(data []byte, v any)
relaykit/relayconvert/kitutil/json.go:58
↓ 130 callers
Method
Header
()
router/plugin-router.go:536
↓ 124 callers
Function
GetTimestamp
()
common/utils.go:239
↓ 121 callers
Function
Marshal
(v any)
relaykit/relayconvert/kitutil/json.go:80
↓ 120 callers
Function
ApiSuccess
(c *gin.Context, data any)
common/gin.go:325
↓ 119 callers
Method
Close
()
middleware/gzip.go:19
↓ 119 callers
Method
reset
reset clears the per-chunk stopped flag so the object can be reused.
relay/helper/stream_result.go:57
↓ 112 callers
Method
Delete
()
model/user.go:946
↓ 112 callers
Method
Init
Init IsStream bool
relay/channel/adapter.go:20
↓ 111 callers
Method
Do
(req *HTTPRequest)
pkg/ionet/types.go:16
↓ 111 callers
Function
LogError
(ctx context.Context, msg string)
logger/logger.go:87
↓ 108 callers
Method
Error
()
model/vendor_management.go:22
↓ 103 callers
Method
Error
()
oauth/types.go:47
↓ 101 callers
Function
ApiErrorT
ApiErrorT responds with a web console message; key is the English source text, which the web console translates with params.
common/gin.go:302
↓ 101 callers
Method
Generation
()
pkg/jsplugin/registry.go:256
↓ 98 callers
Function
LogDebug
LogDebug formats msg with common.LogText only when debug logging is on, so callers pass the format and its arguments instead of a formatted string.
logger/logger.go:93
↓ 98 callers
Function
NewRegistry
()
pkg/jsplugin/registry.go:62
↓ 97 callers
Method
clear
clear releases the whole request chain when its key expires.
common/rate-limit.go:56
↓ 93 callers
Method
Status
()
relay/requestplugin/reply.go:872
↓ 93 callers
Function
cancel
()
web/src/features/system-update/api.ts:38
↓ 93 callers
Method
replace
replace stores the client body with the stage's patched body: JSON as it is, a form view written back into the form body.
relay/requestplugin/relay.go:260
↓ 92 callers
Method
Close
()
controller/passkey_test.go:763
↓ 90 callers
Method
Header
()
controller/responses_websocket.go:61
↓ 88 callers
Function
SysError
(s string)
common/sys_log.go:48
↓ 86 callers
Method
Unregister
(key string)
pkg/jsplugin/registry.go:208
↓ 86 callers
Method
object
object reads one object the table places in the file, which the library may read later: its values within maxPDFObjectValues.
relay/requestplugin/pdf.go:1205
↓ 86 callers
Function
setupSecurityEnrollmentTest
(t *testing.T)
controller/security_enrollment_test.go:44
↓ 84 callers
Method
Exists
(prefix string, path string)
common/embed-file-system.go:18
↓ 84 callers
Function
NewError
(err error, errorCode ErrorCode, ops ...NewAPIErrorOptions)
relaykit/types/error.go:252
↓ 82 callers
Method
Call
Call invokes one named module export and returns its JSON-compatible value.
pluginkit/engine.go:330
↓ 82 callers
Function
close
(open: boolean)
web/src/features/task-plugins/components/upload-dialog.tsx:152
↓ 81 callers
Method
WriteString
(text string)
relay/requestplugin/reply.go:859
↓ 79 callers
Function
truncateTables
(t *testing.T)
model/task_cas_test.go:73
↓ 78 callers
Method
Copy
()
relaykit/dto/openai_response.go:191
↓ 78 callers
Method
from
( error: unknown, fallback = 'Verification failed. Please try again.' )
web/src/lib/secure-verification.ts:38
↓ 77 callers
Function
requireServerSuccess
(response: T)
web/src/lib/server-error-message.ts:237
↓ 75 callers
Function
ApplyParamOverride
(jsonData []byte, paramOverride map[string]any, conditionContext map[string]any)
relay/common/override.go:177
↓ 74 callers
Method
Scan
(val any)
model/task.go:90
↓ 73 callers
Method
string
(node: ExpressionNode)
web/src/features/pricing/lib/billing-expression/runtime.ts:325
↓ 72 callers
Method
Next
(fromServer []byte, more bool)
common/email_ntlm_auth.go:51
↓ 71 callers
Function
LogWarn
(ctx context.Context, msg string, args ...any)
logger/logger.go:80
↓ 69 callers
Method
Error
()
relay/common/override.go:100
↓ 68 callers
Method
Close
()
relay/channel/task/jsplugin/adaptor.go:476
↓ 68 callers
Method
Get
Get 获取指定配置模块
setting/config/config.go:35
↓ 65 callers
Function
CompilePlugin
CompilePlugin validates a plugin without publishing it. Callers that refresh multiple plugins use this together with ReplaceOverrides so readers obser
pluginkit/meta.go:495
↓ 65 callers
Function
UnmarshalJsonStr
(data string, v any)
common/json.go:57
↓ 63 callers
Function
New
(plugin *pluginruntime.LoadedPlugin)
relay/channel/task/jsplugin/adaptor.go:80
↓ 62 callers
Function
securityEnrollmentRequest
(method, path, body, proof string, identity service.AuthIdentity, handler gin.HandlerFunc)
controller/security_enrollment_test.go:118
↓ 61 callers
Function
DecodeJson
(reader io.Reader, v any)
common/json.go:61
↓ 60 callers
Function
NewOpenAIError
(err error, errorCode ErrorCode, statusCode int, ops ...NewAPIErrorOptions)
relaykit/types/error.go:274
↓ 60 callers
Function
truncate
--------------------------------------------------------------------------- Seed helpers -------------------------------------------------------------
service/task_billing_test.go:74
↓ 59 callers
Function
ErrOptionWithSkipRetry
()
relaykit/types/error.go:389
↓ 59 callers
Method
Get
(platform string)
pkg/jsplugin/registry.go:120
↓ 59 callers
Function
InitChannelCache
()
model/channel_cache.go:31
↓ 59 callers
Function
cleanup
()
web/src/features/auth/lib/oauth-popup.ts:66
↓ 59 callers
Function
createServerError
(value: unknown, fallback?: string)
web/src/lib/server-error-message.ts:230
↓ 57 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:491
↓ 57 callers
Method
add
(sample Sample)
pkg/perf_metrics/types.go:114
↓ 56 callers
Method
Close
Close ends the session's plugin work and puts its steps and record on info, where the consume log reads them. Events after it pass untouched.
relay/requestplugin/socket.go:442
↓ 56 callers
Function
GetUserById
(id int, selectAll bool)
model/user.go:507
↓ 56 callers
Method
Open
(name string)
common/embed-file-system.go:26
↓ 56 callers
Function
assertJSONEqual
(t *testing.T, want, got string)
relay/common/override_test.go:2665
↓ 55 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:45
next →
1–100 of 15,592, ranked by callers