Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
10,602 in github.com/QuantumNous/new-api
⨍
Functions
10,602
◇
Types & classes
1,425
↓ 648 callers
Function
cn
(...inputs: ClassValue[])
web/default/src/lib/utils.ts:22
↓ 374 callers
Method
Equal
(other taskSnapshot)
model/task.go:392
↓ 365 callers
Function
showError
(error)
web/classic/src/helpers/utils.jsx:122
↓ 241 callers
Method
Set
(key K, value V)
types/rw_map.go:40
↓ 232 callers
Function
showSuccess
(message)
web/classic/src/helpers/utils.jsx:157
↓ 200 callers
Method
Unmarshal
(data []byte)
relay/channel/volcengine/protocols.go:306
↓ 177 callers
Method
Contains
Contains 检查 Set 是否包含某个元素
types/set.go:24
↓ 169 callers
Function
ApiError
(c *gin.Context, err error)
common/gin.go:199
↓ 167 callers
Method
Marshal
()
relay/channel/volcengine/protocols.go:274
↓ 155 callers
Method
Error
()
oauth/types.go:37
↓ 135 callers
Function
SysLog
(s string)
common/sys_log.go:17
↓ 134 callers
Method
String
()
relay/channel/volcengine/protocols.go:55
↓ 122 callers
Method
Get
(key K)
types/rw_map.go:33
↓ 115 callers
Method
ReadAll
ReadAll returns a copy of the entire map.
types/rw_map.go:61
↓ 104 callers
Method
Error
()
controller/oauth.go:349
↓ 99 callers
Method
Unlock
()
controller/user.go:1272
↓ 97 callers
Function
Unmarshal
(data []byte, v any)
common/json.go:9
↓ 95 callers
Function
GetTimestamp
()
common/utils.go:264
↓ 95 callers
Function
LogError
(ctx context.Context, msg string)
logger/logger.go:84
↓ 93 callers
Method
reset
reset clears the per-chunk stopped flag so the object can be reused.
relay/helper/stream_result.go:50
↓ 88 callers
Method
Create
CreateTwoFA 创建2FA设置
model/twofa.go:66
↓ 81 callers
Method
Query
(params QueryParams)
pkg/perf_metrics/types.go:7
↓ 76 callers
Function
onChange
()
web/default/src/hooks/use-mobile.ts:28
↓ 75 callers
Method
Do
(req *HTTPRequest)
pkg/ionet/types.go:16
↓ 74 callers
Function
ApiSuccess
(c *gin.Context, data any)
common/gin.go:213
↓ 69 callers
Method
Len
()
types/rw_map.go:71
↓ 69 callers
Function
Marshal
(v any)
common/json.go:21
↓ 68 callers
Function
ApplyParamOverride
(jsonData []byte, paramOverride map[string]interface{}, conditionContext map[string]interface{})
relay/common/override.go:138
↓ 60 callers
Method
Add
(item T)
types/set.go:14
↓ 59 callers
Function
NewError
(err error, errorCode ErrorCode, ops ...NewAPIErrorOptions)
types/error.go:244
↓ 57 callers
Function
assertJSONEqual
(t *testing.T, want, got string)
relay/common/override_test.go:2288
↓ 54 callers
Function
LogDebug
(ctx context.Context, msg string, args ...any)
logger/logger.go:88
↓ 53 callers
Function
ApiErrorMsg
(c *gin.Context, msg string)
common/gin.go:206
↓ 52 callers
Method
add
(sample Sample)
pkg/perf_metrics/types.go:89
↓ 51 callers
Function
CloseResponseBodyGracefully
(httpResponse *http.Response)
service/http.go:16
↓ 49 callers
Method
Close
()
relay/channel/minimax/adaptor_test.go:127
↓ 48 callers
Method
Error
()
relay/common/override.go:76
↓ 48 callers
Function
NewOpenAIError
(err error, errorCode ErrorCode, statusCode int, ops ...NewAPIErrorOptions)
types/error.go:266
↓ 48 callers
Function
showInfo
(message)
web/classic/src/helpers/utils.jsx:161
↓ 47 callers
Method
Delete
()
model/user.go:741
↓ 47 callers
Method
Run
(ctx context.Context, task *model.SystemTask, runnerID string)
service/system_task.go:36
↓ 47 callers
Function
SysError
(s string)
common/sys_log.go:24
↓ 47 callers
Function
useIsMobile
()
web/classic/src/hooks/common/useIsMobile.js:24
↓ 45 callers
Function
LogInfo
(ctx context.Context, msg string)
logger/logger.go:76
↓ 45 callers
Method
Save
()
model/channel.go:345
↓ 41 callers
Method
Get
Get 获取指定配置模块
setting/config/config.go:35
↓ 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/default/src/features/system-settings/hooks/use-update-option.ts:42
↓ 38 callers
Function
copy
(text)
web/classic/src/helpers/utils.jsx:72
↓ 36 callers
Function
LogWarn
(ctx context.Context, msg string)
logger/logger.go:80
↓ 35 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
↓ 35 callers
Method
GetEstimatePromptTokens
()
relay/common/relay_info.go:660
↓ 35 callers
Method
Next
(fromServer []byte, more bool)
common/email_ntlm_auth.go:51
↓ 34 callers
Method
Close
()
middleware/gzip.go:18
↓ 32 callers
Method
Close
()
common/body_storage.go:187
↓ 32 callers
Function
StreamScannerHandler
(c *gin.Context, resp *http.Response, info *relaycommon.RelayInfo, dataHandler func(data string, sr *StreamRes
relay/helper/stream_scanner.go:77
↓ 31 callers
Function
SetupApiRequestHeader
(info *common.RelayInfo, c *gin.Context, req *http.Header)
relay/channel/api_request.go:45
↓ 31 callers
Method
Write
(p []byte)
relay/channel/openai/image_stream_test.go:188
↓ 30 callers
Function
DoApiRequest
(a Adaptor, c *gin.Context, info *common.RelayInfo, requestBody io.Reader)
relay/channel/api_request.go:307
↓ 29 callers
Function
GetUserById
(id int, selectAll bool)
model/user.go:391
↓ 29 callers
Function
showWarning
(message)
web/classic/src/helpers/utils.jsx:153
↓ 28 callers
Function
ErrOptionWithSkipRetry
()
types/error.go:381
↓ 28 callers
Function
renderQuota
(quota, digits = 2)
web/classic/src/helpers/render.jsx:1127
↓ 27 callers
Method
Decode
(s string)
pkg/cachex/codec.go:12
↓ 27 callers
Function
ExprHashString
ExprHashString returns the SHA-256 hex digest of an expression string.
pkg/billingexpr/types.go:70
↓ 27 callers
Method
Scan
(val interface{})
model/task.go:83
↓ 27 callers
Method
Update
()
model/task.go:414
↓ 27 callers
Function
channelActionConfig
( config: ApiRequestConfig = {} )
web/default/src/features/channels/api.ts:43
↓ 27 callers
Function
refresh
(page = activePage)
web/classic/src/hooks/users/useUsersData.jsx:228
↓ 27 callers
Function
truncateTables
(t *testing.T)
model/task_cas_test.go:61
↓ 26 callers
Function
GetChannelById
(id int, selectAll bool)
model/channel.go:412
↓ 26 callers
Function
UsingMainDatabase
(databaseType DatabaseType)
common/database.go:36
↓ 26 callers
Function
truncate
--------------------------------------------------------------------------- Seed helpers -------------------------------------------------------------
service/task_billing_test.go:63
↓ 25 callers
Function
WithOpenAIError
(openAIError OpenAIError, statusCode int, ops ...NewAPIErrorOptions)
types/error.go:317
↓ 25 callers
Function
timestamp2string
(timestamp)
web/classic/src/helpers/utils.jsx:192
↓ 25 callers
Function
verifyJSON
(str)
web/classic/src/helpers/utils.jsx:281
↓ 24 callers
Function
IOCopyBytesGracefully
(c *gin.Context, src *http.Response, data []byte)
service/http.go:44
↓ 24 callers
Function
InitChannelCache
()
model/channel_cache.go:26
↓ 24 callers
Function
Interface2String
(inter interface{})
common/utils.go:191
↓ 24 callers
Method
Register
Register 注册一个配置模块
setting/config/config.go:28
↓ 24 callers
Method
StringContent
()
dto/openai_request.go:481
↓ 24 callers
Function
TryTieredSettle
TryTieredSettle checks if the request uses tiered_expr billing and, if so, computes the actual quota using the frozen BillingSnapshot. Returns: - ok=t
service/tiered_settle.go:97
↓ 24 callers
Method
WriteString
(s string)
middleware/audit.go:36
↓ 24 callers
Method
close
()
common/email_test.go:97
↓ 23 callers
Method
GetPageSize
()
common/page_info.go:25
↓ 23 callers
Method
makeRequest
makeRequest performs an HTTP request and handles common response processing
pkg/ionet/client.go:99
↓ 23 callers
Function
useStatus
()
web/default/src/hooks/use-status.ts:40
↓ 22 callers
Function
GetResponseID
(c *gin.Context)
relay/helper/common.go:174
↓ 22 callers
Function
ResponseText2Usage
func GetPromptTokens(textRequest dto.GeneralOpenAIRequest, relayMode int) (int, error) { switch relayMode { case constant.RelayModeChatCompletions:
service/usage_helpr.go:22
↓ 22 callers
Function
formatQuota
(quota: number)
web/default/src/lib/format.ts:72
↓ 21 callers
Method
GetBaseURL
()
model/channel.go:491
↓ 21 callers
Function
GetPageQuery
(c *gin.Context)
common/page_info.go:41
↓ 21 callers
Method
GetSetting
()
model/user.go:82
↓ 21 callers
Method
GetStartIdx
()
common/page_info.go:17
↓ 21 callers
Function
copyToClipboard
(text: string)
web/default/src/lib/copy-to-clipboard.ts:82
↓ 21 callers
Function
formatTimestampToDate
( timestamp?: number, unit: 'seconds' | 'milliseconds' = 'seconds' )
web/default/src/lib/format.ts:138
↓ 20 callers
Method
Bytes
Bytes 获取全部内容
common/body_storage.go:18
↓ 20 callers
Method
Init
Init IsStream bool
relay/channel/adapter.go:17
↓ 20 callers
Function
NewErrorWithStatusCode
(err error, errorCode ErrorCode, statusCode int, ops ...NewAPIErrorOptions)
types/error.go:299
↓ 20 callers
Method
Open
(name string)
common/embed-file-system.go:26
next →
1–100 of 10,602, ranked by callers