MCPcopy Create free account

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

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

↓ 5 callersFunctionGetTokenById
(id int)
model/token.go:245
↓ 5 callersFunctionGetTokenByKey
(key string, fromDB bool)
model/token.go:262
↓ 5 callersMethodGetTokenCountMeta
()
dto/request_common.go:9
↓ 5 callersFunctionGetTopupGroupRatio
(name string)
common/topup-ratio.go:32
↓ 5 callersFunctionGetUserQuota
GetUserQuota gets quota from Redis first, falls back to DB if needed
model/user.go:950
↓ 5 callersFunctionGetUsernameById
GetUsernameById gets username from Redis first, falls back to DB if needed
model/user.go:1193
↓ 5 callersFunctionHasGeminiUsageMetadataTokens
(metadata *GeminiUsageMetadata)
dto/billing_usage.go:190
↓ 5 callersFunctionIncreaseTokenQuota
(tokenId int, key string, quota int)
model/token.go:382
↓ 5 callersMethodInsert
()
model/subscription.go:230
↓ 5 callersMethodIsToolCall
()
dto/openai_response.go:159
↓ 5 callersFunctionLoadFileSource
LoadFileSource 加载文件源数据 这是统一的入口,会自动处理缓存和不同的来源类型
service/file_service.go:47
↓ 5 callersFunctionMaskSensitiveInfo
MaskSensitiveInfo masks sensitive information like URLs, IPs, and domain names in a string Example: http://example.com -> http://***.com https://api.t
common/str.go:199
↓ 5 callersFunctionNewFileSourceFromData
(data string, mimeType string)
types/file_source.go:134
↓ 5 callersFunctionNewGeminiChatBillingUsage
(metadata *GeminiUsageMetadata)
dto/billing_usage.go:106
↓ 5 callersFunctionNewRWMap
()
types/rw_map.go:27
↓ 5 callersFunctionNewResponseStreamState
(from types.RelayFormat, target types.RelayFormat, options ResponseStreamOptions)
service/relayconvert/response_registry.go:270
↓ 5 callersFunctionOaiStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay-openai.go:104
↓ 5 callersFunctionOpenaiImageHandler
OpenaiImageHandler handles non-streaming OpenAI image responses (generations/edits), returning the parsed usage for billing.
relay/channel/openai/relay_image.go:34
↓ 5 callersFunctionPostConsumeQuota
(relayInfo *relaycommon.RelayInfo, quota int, preConsumedQuota int, sendEmail bool)
service/quota.go:411
↓ 5 callersFunctionRecordTopupLog
(userId int, content string, callerIp string, paymentMethod string, callbackPaymentMethod string)
model/log.go:254
↓ 5 callersFunctionResponseChunkData
(c *gin.Context, resp dto.ResponsesStreamResponse, data string)
relay/helper/common.go:87
↓ 5 callersMethodSetModelName
(modelName string)
dto/request_common.go:11
↓ 5 callersFunctionSha1
(data []byte)
common/hash.go:22
↓ 5 callersMethodToResponse
()
model/system_task.go:416
↓ 5 callersFunctionTokenAuth
()
middleware/auth.go:314
↓ 5 callersFunctionTrimEffortSuffix
TrimEffortSuffix -> modelName level(low) exists
setting/reasoning/suffix.go:16
↓ 5 callersMethodUpdate
()
model/topup.go:56
↓ 5 callersMethodUpdate
()
model/subscription.go:237
↓ 5 callersMethodUpdate
()
model/channel.go:526
↓ 5 callersMethodUpdateAbilities
UpdateAbilities updates abilities of this channel. Make sure the channel is completed before calling this function.
model/ability.go:243
↓ 5 callersFunctionUpdateChannelStatus
(channelId int, usingKey string, status int, reason string)
model/channel.go:706
↓ 5 callersFunctionUpdateConfigFromMap
UpdateConfigFromMap 从map更新配置对象(导出函数)
setting/config/config.go:281
↓ 5 callersFunctionUpdateOption
(key string, value string)
model/option.go:207
↓ 5 callersFunctionValidateNumericCode
ValidateNumericCode 验证数字验证码格式
common/totp.go:128
↓ 5 callersFunctionabortWithOpenAiMessage
(c *gin.Context, statusCode int, message string, code ...types.ErrorCode)
middleware/utils.go:12
↓ 5 callersFunctionapplyUsagePostProcessing
(info *relaycommon.RelayInfo, usage *dto.Usage, responseBody []byte)
relay/channel/openai/usage.go:10
↓ 5 callersFunctionbuildChannelAffinityTemplateContextForTest
(meta channelAffinityMeta)
service/channel_affinity_template_test.go:17
↓ 5 callersFunctionbuildOpenAIStyleUsageFromClaudeUsage
(usage *dto.Usage)
relay/channel/claude/relay-claude.go:56
↓ 5 callersFunctionbuildQueryParams
buildQueryParams builds query parameters for GET requests
pkg/ionet/client.go:161
↓ 5 callersFunctioncanonicalUsageFromResponse
(response any)
service/relayconvert/response_registry.go:733
↓ 5 callersFunctioncolorAt
(index: number, palette?: readonly string[])
web/default/src/features/dashboard/lib/flow.ts:279
↓ 5 callersFunctioncompleteAssistantTiming
( message: Message, completedAt: number = Date.now() )
web/default/src/features/playground/lib/message/message-timing-utils.ts:22
↓ 5 callersFunctionconfirmPaymentComplianceForTest
(t *testing.T)
controller/payment_webhook_availability_test.go:11
↓ 5 callersFunctiondecodeAPIResponse
(t *testing.T, recorder *httptest.ResponseRecorder)
controller/token_test.go:208
↓ 5 callersFunctiondecodeData
(data []byte, target *T)
pkg/ionet/jsonutil.go:28
↓ 5 callersMethodensureStart
()
service/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:139
↓ 5 callersFunctionfetchDeployments
({ page, size, keyword, status })
web/classic/src/hooks/model-deployments/useDeploymentsData.jsx:176
↓ 5 callersFunctionformatBillingCurrencyFromUSD
( amountUSD: number | null | undefined, options?: CurrencyFormatOptions )
web/default/src/lib/currency.ts:451
↓ 5 callersFunctionformatLogQuota
(quota: number)
web/default/src/lib/format.ts:208
↓ 5 callersFunctionformatPricingNumber
(value: unknown)
web/default/src/features/system-settings/models/pricing-format.ts:55
↓ 5 callersFunctionformatQuotaWithCurrency
( quota: number | null | undefined, options?: CurrencyFormatOptions )
web/default/src/lib/currency.ts:496
↓ 5 callersFunctiongetChannelAffinityMeta
(c *gin.Context)
service/channel_affinity.go:375
↓ 5 callersFunctiongetFormValues
()
web/classic/src/hooks/channels/useChannelsData.jsx:310
↓ 5 callersFunctiongetLogOther
(otherStr)
web/classic/src/helpers/log.js:20
↓ 5 callersFunctiongetMessageContent
(message: Message)
web/default/src/features/playground/lib/message/message-utils.ts:49
↓ 5 callersFunctiongetOAuthProviderIcon
(iconName, size = 20)
web/classic/src/helpers/render.jsx:558
↓ 5 callersFunctiongetOAuthState
()
web/default/src/features/auth/api.ts:89
↓ 5 callersFunctiongetPreferredSyncField
(model, ratioType, sourceName)
web/classic/src/pages/Setting/Ratio/UpstreamRatioSync.jsx:351
↓ 5 callersFunctiongetQuotaPerUnit
()
web/classic/src/helpers/quota.js:21
↓ 5 callersFunctiongetSavedChartPreferences
()
web/default/src/features/dashboard/lib/filters.ts:94
↓ 5 callersFunctiongetUserAvatarFallback
(name: string)
web/default/src/lib/avatar.ts:43
↓ 5 callersFunctiongetUserAvatarStyle
(name: string)
web/default/src/lib/avatar.ts:31
↓ 5 callersFunctionhandleColumnVisibilityChange
(key, checked)
web/classic/src/components/table/model-deployments/modals/ColumnSelectorModal.jsx:43
↓ 5 callersFunctioninitDefaultColumns
()
web/classic/src/hooks/mj-logs/useMjLogsData.js:144
↓ 5 callersFunctionisApiSuccess
(response: ApiResponse)
web/default/src/features/wallet/api.ts:51
↓ 5 callersFunctionisContentSizedColumn
(columnId: string)
web/default/src/components/data-table/core/content-sized-columns.ts:19
↓ 5 callersFunctionisDynamicPricingModel
(model: PricingModel)
web/default/src/features/pricing/lib/dynamic-price.ts:65
↓ 5 callersFunctionisJsonObjectValue
(value: unknown)
web/default/src/features/channels/lib/channel-form.ts:44
↓ 5 callersFunctionisPaymentComplianceConfirmed
()
controller/payment_webhook_availability.go:10
↓ 5 callersFunctionisSidebarSectionAllowed
(sectionKey)
web/classic/src/hooks/common/useUserPermissions.js:63
↓ 5 callersFunctionisTokenBasedModel
(model: PricingModel)
web/default/src/features/pricing/lib/model-helpers.ts:107
↓ 5 callersFunctionloadRedemptions
(page = 1, pageSize)
web/classic/src/hooks/redemptions/useRedemptionsData.jsx:74
↓ 5 callersFunctionloadTokens
(page = 1, size = pageSize)
web/classic/src/hooks/tokens/useTokensData.jsx:104
↓ 5 callersFunctionloadVendors
()
web/classic/src/hooks/models/useModelsData.jsx:110
↓ 5 callersMethodmakeChunk
(delta dto.ChatCompletionsStreamResponseChoiceDelta, finishReason *string)
service/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:502
↓ 5 callersFunctionmergeModelNames
(base []string, appended []string)
controller/channel_upstream_update.go:100
↓ 5 callersFunctionmustRawMessage
(t *testing.T, value any)
service/relayconvert/request_registry_test.go:734
↓ 5 callersFunctionmustStreamChunks
(t *testing.T, state *ResponsesToChatStreamState, event *dto.ResponsesStreamResponse)
service/relayconvert/internal/oai_responses/to_oai_chat_resp_test.go:385
↓ 5 callersFunctionnewAuthenticatedContext
(t *testing.T, method string, target string, body any, userID int)
controller/token_test.go:184
↓ 5 callersFunctionnewFakeSMTPServer
(t *testing.T)
common/email_test.go:35
↓ 5 callersFunctionnormalizeCondition
(cond)
web/classic/src/pages/Setting/Ratio/components/requestRuleExpr.js:111
↓ 5 callersFunctionnormalizeLanguage
(language)
web/classic/src/i18n/language.js:30
↓ 5 callersFunctionnormalizeVisualTier
( tier: Partial<VisualTier> = {} )
web/default/src/features/pricing/lib/tier-expr.ts:61
↓ 5 callersFunctionparseAdvancedCustomConfig
( value: string | undefined )
web/default/src/features/channels/lib/advanced-custom.ts:465
↓ 5 callersFunctionparseLooseValue
(valueText: string)
web/default/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:463
↓ 5 callersFunctionparseLooseValue
(valueText)
web/classic/src/components/table/channels/modals/ParamOverrideEditorModal.jsx:507
↓ 5 callersFunctionparseOptionalJson
(value: string | undefined)
web/default/src/features/channels/lib/channel-form.ts:39
↓ 5 callersFunctionparseRatioMap
(value: string)
web/default/src/features/system-settings/models/group-ratio-visual-editor.tsx:112
↓ 5 callersFunctionparseUsableMap
(value: string)
web/default/src/features/system-settings/models/group-ratio-visual-editor.tsx:119
↓ 5 callersFunctionpaymentReturnPath
(suffix string)
controller/return_path.go:10
↓ 5 callersFunctionprepareOAuthState
(options = {})
web/classic/src/helpers/api.js:259
↓ 5 callersFunctionquotaUnitsToDollars
(units: number)
web/default/src/lib/format.ts:105
↓ 5 callersFunctionrateLimitFactory
(maxRequestNum int, duration int64, mark string)
middleware/rate-limit.go:76
↓ 5 callersFunctionredirectToOAuthUrl
(url, options = {})
web/classic/src/helpers/api.js:40
↓ 5 callersFunctionrefresh
(page = activePage)
web/classic/src/hooks/model-deployments/useDeploymentsData.jsx:228
↓ 5 callersFunctionrenderBillingArticle
(lines, { showReferenceNote = true } = {})
web/classic/src/helpers/render.jsx:1272
↓ 5 callersFunctionresetSession
()
web/default/src/features/auth/hooks/use-oauth-login.ts:61
↓ 5 callersFunctionrowMetrics
(row: FlowQuotaDataItem)
web/default/src/features/dashboard/lib/flow.ts:156
↓ 5 callersFunctionsankeyDatumValue
( datum: Record<string, unknown>, key: string )
web/default/src/features/dashboard/lib/flow.ts:1041
↓ 5 callersFunctionsaveMessages
(messages)
web/classic/src/components/playground/configStorage.js:47
← previousnext →501–600 of 10,602, ranked by callers