MCPcopy Create free account

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

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

↓ 11 callersMethodRender
(w http.ResponseWriter)
common/custom-event.go:73
↓ 11 callersFunctionSendEmail
(subject string, receiver string, content string)
common/email.go:78
↓ 11 callersFunctionformatCurrencyFromUSD
( amountUSD: number | null | undefined, options?: CurrencyFormatOptions )
web/default/src/lib/currency.ts:388
↓ 11 callersFunctiongenBaseRelayInfo
(c *gin.Context, request dto.Request)
relay/common/relay_info.go:439
↓ 11 callersFunctiongetTokenRemainQuota
(t *testing.T, id int)
service/task_billing_test.go:252
↓ 11 callersFunctionrequirePaymentCompliance
(c *gin.Context)
controller/payment_compliance.go:22
↓ 11 callersFunctionsafeJsonParse
( value: string | undefined | null, options: SafeJsonParseOptions<T> = {} )
web/default/src/features/system-settings/utils/json-parser.ts:113
↓ 11 callersFunctionseedToken
(t *testing.T, id int, userId int, key string, remainQuota int)
service/task_billing_test.go:84
↓ 11 callersFunctionuseSidebar
()
web/default/src/components/ui/sidebar.tsx:67
↓ 11 callersFunctionuseTheme
()
web/default/src/context/theme-provider.tsx:141
↓ 11 callersFunctionwithSMTPSettings
(t *testing.T)
common/email_test.go:243
↓ 10 callersFunctionDoTaskApiRequest
(a TaskAdaptor, c *gin.Context, info *common.RelayInfo, requestBody io.Reader)
relay/channel/api_request.go:527
↓ 10 callersFunctionDone
(c *gin.Context)
relay/helper/common.go:136
↓ 10 callersMethodError
Error implements the error interface
pkg/ionet/types.go:274
↓ 10 callersFunctionGetAuthHeader
GetAuthHeader get auth header
controller/channel-billing.go:125
↓ 10 callersMethodGetErrorCode
()
types/error.go:109
↓ 10 callersFunctionGetUserGroup
GetUserGroup gets group from Redis first, falls back to DB if needed
model/user.go:988
↓ 10 callersMethodHasErrors
()
relay/common/stream_status.go:70
↓ 10 callersFunctionLockOrder
LockOrder 尝试对给定订单号加锁
controller/topup.go:279
↓ 10 callersMethodMarshalJSONString
MarshalJSONString returns the JSON string representation of the RWMap.
types/rw_map.go:97
↓ 10 callersFunctionNewOAuthError
NewOAuthError creates a new OAuth error with the given message key
oauth/types.go:45
↓ 10 callersFunctionNewOAuthErrorWithRaw
NewOAuthErrorWithRaw creates a new OAuth error with raw error message for logging
oauth/types.go:53
↓ 10 callersFunctionNewStreamScanner
(reader io.Reader)
relay/helper/stream_scanner.go:43
↓ 10 callersMethodSetEndReason
(reason StreamEndReason, err error)
relay/common/stream_status.go:45
↓ 10 callersFunctionTaskErrorWrapperLocal
(err error, code string, statusCode int)
service/error.go:187
↓ 10 callersMethodTotalErrorCount
()
relay/common/stream_status.go:79
↓ 10 callersFunctionUnlockOrder
UnlockOrder 释放给定订单号的锁
controller/topup.go:294
↓ 10 callersMethodUpdateBalance
(balance float64)
model/channel.go:585
↓ 10 callersFunctionadvancedCustomGinContext
(path string)
relay/channel/advancedcustom/adaptor_test.go:669
↓ 10 callersFunctioncreateCardProPagination
({ currentPage, pageSize, total, onPageChange, onPageSizeChange, isMobile = false, pageSizeOpts
web/classic/src/helpers/utils.jsx:1009
↓ 10 callersFunctioncreateSectionRegistry
(config: SectionRegistryConfig<TSectionId, TSettings, TExtraArgs>)
web/default/src/features/system-settings/utils/section-registry.ts:49
↓ 10 callersFunctionfetchStats
()
web/classic/src/pages/Setting/Performance/SettingsPerformance.jsx:125
↓ 10 callersFunctiongetUserCacheKey
getUserCacheKey returns the key for user cache
model/user_cache.go:48
↓ 10 callersFunctionloadKeyStatus
( page = currentPage, size = pageSize, status = statusFilter, )
web/classic/src/components/table/channels/modals/MultiKeyManageModal.jsx:74
↓ 10 callersFunctionperformHeaderNavRequest
(t *testing.T, handler gin.HandlerFunc, authenticated bool)
middleware/header_nav_test.go:37
↓ 10 callersFunctionprocessHeaderOverride
processHeaderOverride applies channel header overrides, with placeholder substitution. Supported placeholders: - {api_key}: resolved to the channel AP
relay/channel/api_request.go:190
↓ 10 callersFunctionrefresh
(page = activePage)
web/classic/src/hooks/channels/useChannelsData.jsx:424
↓ 10 callersFunctionsetupModelListControllerTestDB
(t *testing.T)
controller/model_list_test.go:37
↓ 10 callersFunctionshouldUpdateRedis
(fromDB bool, err error)
model/utils.go:125
↓ 10 callersFunctionsideDrawerFooterClassName
(className?: string)
web/default/src/components/drawer-layout.ts:42
↓ 10 callersFunctiontriggerRefresh
()
web/default/src/features/users/components/users-provider.tsx:41
↓ 10 callersFunctionuseMediaQuery
(query: string)
web/default/src/hooks/use-media-query.ts:26
↓ 10 callersFunctionuseMinimumLoadingTime
(loading, minimumTime = 1000)
web/classic/src/hooks/common/useMinimumLoadingTime.js:28
↓ 10 callersFunctionuseSearch
()
web/default/src/context/search-provider.tsx:57
↓ 10 callersFunctionuseTableCompactMode
(tableKey = 'global')
web/classic/src/hooks/common/useTableCompactMode.js:29
↓ 10 callersFunctionwithHeaderNavModules
(t *testing.T, raw string)
middleware/header_nav_test.go:15
↓ 9 callersFunctionBuildTieredTokenParams
BuildTieredTokenParams constructs billingexpr.TokenParams from a dto.Usage, normalizing P and C so they mean "tokens not separately priced by the expr
service/tiered_settle.go:21
↓ 9 callersFunctionGetChannelAffinitySetting
()
setting/operation_setting/channel_affinity_setting.go:156
↓ 9 callersMethodGetFinalRequestRelayFormat
()
relay/common/relay_info.go:630
↓ 9 callersFunctionGetGeneralSetting
()
setting/operation_setting/general_setting.go:40
↓ 9 callersFunctionGetJsonString
(data any)
common/str.go:112
↓ 9 callersMethodGetReasoningContent
()
dto/openai_request.go:444
↓ 9 callersMethodGetRequestURL
(info *relaycommon.RelayInfo)
relay/channel/advancedcustom/adaptor.go:189
↓ 9 callersFunctionIsPaymentComplianceConfirmed
()
setting/operation_setting/payment_setting.go:33
↓ 9 callersMethodIsStringContent
()
dto/claude.go:127
↓ 9 callersFunctionLogQuota
(quota int)
logger/logger.go:122
↓ 9 callersFunctionMapToJsonStr
(m map[string]interface{})
common/str.go:48
↓ 9 callersFunctionNewProxyHttpClient
NewProxyHttpClient 创建支持代理的 HTTP 客户端
service/http_client.go:124
↓ 9 callersFunctionNewStreamStatus
()
relay/common/stream_status.go:41
↓ 9 callersFunctionPassword2Hash
(password string)
common/crypto.go:23
↓ 9 callersFunctionPostTextConsumeQuota
(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, usage *dto.Usage, extraContent []string)
service/text_quota.go:347
↓ 9 callersMethodRemove
Remove 从 Set 中移除一个元素
types/set.go:19
↓ 9 callersFunctionRunExprWithRequest
(exprStr string, params TokenParams, request RequestInput)
pkg/billingexpr/run.go:28
↓ 9 callersFunctionStringData
(c *gin.Context, str string)
relay/helper/common.go:97
↓ 9 callersMethodToOpenAIError
()
types/error.go:180
↓ 9 callersMethodType
()
service/system_task.go:35
↓ 9 callersFunctionUsedVars
UsedVars returns the set of identifier names referenced by an expression. The result is cached alongside the compiled program. Returns nil for empty i
pkg/billingexpr/compile.go:144
↓ 9 callersFunctionUserSubject
UserSubject is the casbin subject string for a single user.
service/authz/permission.go:20
↓ 9 callersMethodValue
()
model/task.go:92
↓ 9 callersMethodconvertToAliRequest
(info *relaycommon.RelayInfo, req relaycommon.TaskSubmitReq)
relay/channel/task/ali/adaptor.go:350
↓ 9 callersFunctioncopyText
(text)
web/classic/src/components/settings/PersonalSetting.jsx:489
↓ 9 callersFunctioncreateDefaultOperation
()
web/classic/src/components/table/channels/modals/ParamOverrideEditorModal.jsx:809
↓ 9 callersFunctiongetChannelAffinityCache
()
service/channel_affinity.go:81
↓ 9 callersFunctionhandleInputChange
(name, value)
web/classic/src/components/table/channels/modals/EditChannelModal.jsx:602
↓ 9 callersFunctionisAdmin
()
web/classic/src/helpers/utils.jsx:35
↓ 9 callersFunctionnewAPIErrorFromParamOverride
(err error)
relay/param_override_error.go:8
↓ 9 callersFunctionparseQuotaFromDollars
(amount: number)
web/default/src/lib/format.ts:83
↓ 9 callersFunctionquotaToDisplayAmount
(quota)
web/classic/src/helpers/quota.js:26
↓ 9 callersFunctionrawJSONPresent
(raw json.RawMessage)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:540
↓ 9 callersFunctionrecordManageAuditFor
recordManageAuditFor 记录一条管理审计日志,日志归属于操作者;targetUserId 只表示被操作用户,用于在结构化参数中保留目标上下文。
controller/audit.go:99
↓ 9 callersFunctionremoveTrailingSlash
(url)
web/classic/src/helpers/utils.jsx:177
↓ 9 callersFunctionsetUserData
(data)
web/classic/src/helpers/data.js:59
↓ 9 callersFunctionupdateAPI
()
web/classic/src/helpers/api.js:83
↓ 9 callersFunctionuseApiKeys
()
web/default/src/features/keys/components/api-keys-provider.tsx:182
↓ 9 callersFunctionuseIsMobile
()
web/default/src/hooks/use-mobile.ts:23
↓ 9 callersFunctionuseModels
()
web/default/src/features/models/components/models-provider.tsx:131
↓ 9 callersFunctionuseThemeCustomization
()
web/default/src/context/theme-customization-provider.tsx:260
↓ 8 callersMethodClose
()
relay/channel/openai/image_stream_test.go:165
↓ 8 callersFunctionConvertRequest
(c *gin.Context, info *relaycommon.RelayInfo, target types.RelayFormat, request any)
service/request_converter.go:20
↓ 8 callersMethodDeleteMany
DeleteMany accepts either fully namespaced keys or raw keys and deletes them. It returns a map keyed by fully namespaced keys.
pkg/cachex/hybrid_cache.go:231
↓ 8 callersMethodDialContext
(ctx context.Context, network, addr string)
service/protected_fetch_client.go:170
↓ 8 callersMethodFillUserById
()
model/user.go:793
↓ 8 callersFunctionFlushWriter
(c *gin.Context)
relay/helper/common.go:17
↓ 8 callersFunctionGetFetchSetting
()
setting/system_setting/fetch_setting.go:32
↓ 8 callersFunctionGetPasskeyByUserID
(userID int)
model/passkey.go:142
↓ 8 callersFunctionGetPasskeySettings
()
setting/system_setting/passkey.go:35
↓ 8 callersFunctionGetSystemTaskByTaskID
(taskID string)
model/system_task.go:121
↓ 8 callersFunctionInit
(db *gorm.DB)
service/authz/enforcer.go:33
↓ 8 callersMethodKeys
Keys returns keys with valid values. In Redis, it returns all matching keys.
pkg/cachex/hybrid_cache.go:132
↓ 8 callersFunctionOpenaiImageStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay_image.go:93
← previousnext →201–300 of 10,602, ranked by callers