MCPcopy Create free account

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

Functions9,514 in github.com/QuantumNous/new-api

↓ 5 callersFunctionUpdateConfigFromMap
UpdateConfigFromMap 从map更新配置对象(导出函数)
setting/config/config.go:281
↓ 5 callersFunctionUpdateOption
(key string, value string)
model/option.go:218
↓ 5 callersFunctionUsageFromGeminiMetadata
(metadata *dto.GeminiUsageMetadata, fallbackPromptTokens int)
relaykit/relayconvert/response_compat.go:71
↓ 5 callersFunctionValidateConsoleSettings
(settingsStr string, settingType string)
setting/console_setting/validation.go:62
↓ 5 callersFunctionabortWithOpenAiMessage
(c *gin.Context, statusCode int, message string, code ...types.ErrorCode)
middleware/utils.go:12
↓ 5 callersFunctionapplyAuthBundle
( bundle: AuthBundle, synchronizeTabs = true )
web/src/lib/auth-session.ts:148
↓ 5 callersFunctionapplyUsagePostProcessing
(info *relaycommon.RelayInfo, usage *dto.Usage, responseBody []byte)
relay/channel/openai/usage.go:10
↓ 5 callersFunctionauthRotationData
(bundle *service.AuthBundle)
controller/auth_session.go:182
↓ 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)
relaykit/relayconvert/response_registry.go:739
↓ 5 callersFunctioncolorAt
(index: number, palette?: readonly string[])
web/src/features/dashboard/lib/flow.ts:279
↓ 5 callersFunctioncompleteAssistantTiming
( message: Message, completedAt: number = Date.now() )
web/src/features/playground/lib/message/message-timing-utils.ts:22
↓ 5 callersFunctionconfigureTokenAutoGroupsTest
(t *testing.T, maxCount string, autoGroups string)
controller/token_auto_groups_test.go:19
↓ 5 callersFunctionconfirmPaymentComplianceForTest
(t *testing.T)
controller/payment_webhook_availability_test.go:11
↓ 5 callersFunctiondecodeData
(data []byte, target *T)
pkg/ionet/jsonutil.go:28
↓ 5 callersMethodensureStart
()
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:139
↓ 5 callersFunctionformatBillingCurrencyFromUSD
( amountUSD: number | null | undefined, options?: CurrencyFormatOptions )
web/src/lib/currency.ts:451
↓ 5 callersFunctionformatPricingNumber
(value: unknown)
web/src/features/system-settings/models/pricing-format.ts:55
↓ 5 callersFunctionformatQuotaWithCurrency
( quota: number | null | undefined, options?: CurrencyFormatOptions )
web/src/lib/currency.ts:496
↓ 5 callersFunctiongetChannelAffinityMeta
(c *gin.Context)
service/channel_affinity.go:375
↓ 5 callersFunctiongetMessageContent
(message: Message)
web/src/features/playground/lib/message/message-utils.ts:49
↓ 5 callersFunctiongetSavedChartPreferences
()
web/src/features/dashboard/lib/filters.ts:94
↓ 5 callersFunctiongetTaskQuota
(t *testing.T, id int64)
service/task_billing_test.go:273
↓ 5 callersFunctiongetUserAvatarFallback
(name: string)
web/src/lib/avatar.ts:43
↓ 5 callersFunctiongetUserAvatarStyle
(name: string)
web/src/lib/avatar.ts:31
↓ 5 callersFunctionisContentSizedColumn
(columnId: string)
web/src/components/data-table/core/content-sized-columns.ts:19
↓ 5 callersFunctionisDynamicPricingModel
(model: PricingModel)
web/src/features/pricing/lib/dynamic-price.ts:65
↓ 5 callersFunctionisJsonObjectValue
(value: unknown)
web/src/features/channels/lib/channel-form.ts:109
↓ 5 callersFunctionisPaymentComplianceConfirmed
()
controller/payment_webhook_availability.go:10
↓ 5 callersFunctionisRecord
(value: unknown)
web/src/lib/auth-session.ts:88
↓ 5 callersFunctionisTokenBasedModel
(model: PricingModel)
web/src/features/pricing/lib/model-helpers.ts:107
↓ 5 callersMethodmakeChunk
(delta dto.ChatCompletionsStreamResponseChoiceDelta, finishReason *string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:519
↓ 5 callersFunctionmergeModelNames
(base []string, appended []string)
controller/channel_upstream_update.go:107
↓ 5 callersFunctionmustRawMessage
(t *testing.T, value any)
relaykit/relayconvert/request_registry_test.go:698
↓ 5 callersFunctionnewFakeSMTPServer
(t *testing.T)
common/email_test.go:35
↓ 5 callersFunctionnewHTTPClientWithPolicyAndTLS
newHTTPClientWithPolicyAndTLS is a test seam that builds a never-used transport stack with the given policy and TLS config (for httptest certificate t
service/http_client.go:350
↓ 5 callersFunctionnewTokenAutoGroupsAuthenticatedContext
(t *testing.T, method string, target string, body any, userID int)
controller/token_auto_groups_test.go:67
↓ 5 callersFunctionnormalizeVisualTier
( tier: Partial<VisualTier> = {} )
web/src/features/pricing/lib/tier-expr.ts:61
↓ 5 callersFunctionparseAdvancedCustomConfig
( value: string | undefined )
web/src/features/channels/lib/advanced-custom.ts:477
↓ 5 callersFunctionparseLooseValue
(valueText: string)
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:464
↓ 5 callersFunctionparseOptionalJson
(value: string | undefined)
web/src/features/channels/lib/channel-form.ts:104
↓ 5 callersFunctionparseRatioMap
(value: string)
web/src/features/system-settings/models/group-ratio-visual-editor.tsx:120
↓ 5 callersFunctionparseUsableMap
(value: string)
web/src/features/system-settings/models/group-ratio-visual-editor.tsx:127
↓ 5 callersFunctionpreserveToolPrices
(t *testing.T)
setting/operation_setting/tools_price_test.go:11
↓ 5 callersFunctionquotaUnitsToDollars
(units: number)
web/src/lib/format.ts:105
↓ 5 callersFunctionrequestClientIP
(router http.Handler, remoteAddr string, forwardedFor string)
middleware/trusted_proxies_test.go:13
↓ 5 callersFunctionrequireOptionMissing
(t *testing.T, db *gorm.DB, key string)
model/frontend_option_migration_test.go:37
↓ 5 callersFunctionrowMetrics
(row: FlowQuotaDataItem)
web/src/features/dashboard/lib/flow.ts:156
↓ 5 callersFunctionsanitizeAuthRedirect
( value: unknown, origin: string )
web/src/features/auth/lib/auth-redirect.ts:46
↓ 5 callersFunctionsankeyDatumValue
( datum: Record<string, unknown>, key: string )
web/src/features/dashboard/lib/flow.ts:1041
↓ 5 callersFunctionseedPollingTask
(t *testing.T, channelID int, publicID string, upstreamID string)
service/task_polling_test.go:148
↓ 5 callersFunctionseedSubscriptionResetPlan
(t *testing.T, plan *SubscriptionPlan)
model/subscription_reset_test.go:12
↓ 5 callersFunctionseedTaskPollingChannel
(t *testing.T, id int, disableSleep bool)
service/task_polling_test.go:133
↓ 5 callersFunctionsetupAuthFlowControllerTest
(t *testing.T)
controller/auth_flow_test.go:50
↓ 5 callersFunctionsetupTokenAutoGroupsControllerTest
(t *testing.T)
controller/token_auto_groups_test.go:41
↓ 5 callersFunctionsplitBillingExprAndRequestRules
(expr: string)
web/src/features/pricing/lib/billing-expr.ts:533
↓ 5 callersFunctionstartHTTP2TLSServer
(t *testing.T, handler http.Handler)
service/http_client_transport_test.go:99
↓ 5 callersFunctionstringifyAdvancedCustomConfig
( config: AdvancedCustomConfig )
web/src/features/channels/lib/advanced-custom.ts:492
↓ 5 callersFunctiontestTLSClientConfig
(t *testing.T, server *httptest.Server)
service/http_client_transport_test.go:91
↓ 5 callersFunctiontextRegistryChatResponse
()
relaykit/relayconvert/response_registry_test.go:615
↓ 5 callersFunctiontoNumberOrNull
(value: unknown)
web/src/features/system-settings/models/model-pricing-core.ts:153
↓ 5 callersFunctionupdateChannel
( id: number, data: Partial<Channel> )
web/src/features/channels/api.ts:130
↓ 5 callersFunctionupdateUserCache
updateUserCache refreshes non-quota user cache fields. Quota is maintained by atomic quota delta paths and must not be overwritten by stale user snaps
model/user_cache.go:86
↓ 5 callersFunctionuseBranch
()
web/src/components/ai-elements/branch.tsx:49
↓ 5 callersFunctionuseLogsViewScope
()
web/src/features/usage-logs/components/usage-logs-provider.tsx:94
↓ 5 callersFunctionvalidateAdvancedCustomConfig
( config: AdvancedCustomConfig | null )
web/src/features/channels/lib/advanced-custom.ts:533
↓ 5 callersFunctionvalidateChannel
validateChannel 通用的渠道校验函数
controller/channel.go:474
↓ 5 callersFunctionwriteUserCache
(user *UserBase, includeQuota bool)
model/user_auth_cache.go:48
↓ 4 callersMethodAddAll
(other map[K]V)
types/rw_map.go:46
↓ 4 callersFunctionAdminResetUserSubscriptionsByPlan
(userId int, planId int, advanceResetTime bool)
model/subscription.go:1081
↓ 4 callersFunctionApiSuccessI18n
ApiSuccessI18n returns a translated success message based on the user's language preference
common/gin.go:232
↓ 4 callersMethodAppendRequestConversion
AppendRequestConversion records a hop in the request format chain.
relaykit/relayconvert/convmeta/meta.go:45
↓ 4 callersMethodApplyOtherRatiosToFloat
(value float64)
types/price_data.go:84
↓ 4 callersFunctionCallID
(item map[string]any)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_req.go:496
↓ 4 callersFunctionClaimExternalAuthAssertion
ClaimExternalAuthAssertion records a signed provider assertion as consumed. The assertion is HMACed before storage and the unique token_hash index mak
model/auth_flow.go:124
↓ 4 callersFunctionCommonClaudeHeadersOperation
(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo)
relay/channel/claude/adaptor.go:74
↓ 4 callersMethodConvOptions
ConvOptions returns the request-scoped conversion options snapshot. Must never return nil.
relaykit/relayconvert/convmeta/meta.go:49
↓ 4 callersFunctionConvertRequestByID
(c *gin.Context, info *relaycommon.RelayInfo, converter string, request any)
service/request_converter.go:30
↓ 4 callersFunctionCountUserSubscriptionsByPlan
(userId int, planId int)
model/subscription.go:413
↓ 4 callersFunctionCovertMjpActionToModelName
(mjAction string)
service/midjourney.go:22
↓ 4 callersFunctionCreateUserSubscriptionFromPlanTx
(tx *gorm.DB, userId int, plan *SubscriptionPlan, source string)
model/subscription.go:484
↓ 4 callersFunctionDecodeLocalTaskID
DecodeLocalTaskID decodes a base64-encoded upstream operation name.
relay/channel/task/taskcommon/helpers.go:55
↓ 4 callersMethodDecodePayload
(v any)
model/system_task.go:408
↓ 4 callersFunctionDecreaseTokenQuota
(id int, key string, quota int)
model/token.go:435
↓ 4 callersFunctionDecrementDiskFiles
DecrementDiskFiles 减少磁盘文件计数
common/disk_cache_config.go:115
↓ 4 callersFunctionDoDownloadRequest
(originUrl string, reason ...string)
service/download.go:52
↓ 4 callersFunctionDoWorkerRequest
DoWorkerRequest 通过Worker发送请求
service/download.go:24
↓ 4 callersFunctionErrOptionWithNoRecordErrorLog
()
relaykit/types/error.go:387
↓ 4 callersMethodFullKey
(key string)
pkg/cachex/hybrid_cache.go:55
↓ 4 callersFunctionGeminiTextGenerationHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini-native.go:20
↓ 4 callersFunctionGenerateHMACWithKey
(key []byte, data string)
common/crypto.go:11
↓ 4 callersFunctionGenerateRandomCharsKey
(length int)
common/utils.go:231
↓ 4 callersFunctionGenerateStopResponse
(id string, createAt int64, model string, finishReason string)
relay/helper/common.go:202
↓ 4 callersFunctionGetChannelAffinityUsageCacheStats
(ruleName, usingGroup, keyFp string)
service/channel_affinity.go:790
↓ 4 callersFunctionGetCheckinSetting
GetCheckinSetting 获取签到配置
setting/operation_setting/checkin_setting.go:25
↓ 4 callersFunctionGetContextKeyType
(c *gin.Context, key constant.ContextKey)
common/gin.go:189
↓ 4 callersFunctionGetCustomOAuthProviderById
GetCustomOAuthProviderById returns a custom OAuth provider by ID
model/custom_oauth_provider.go:88
↓ 4 callersFunctionGetDiscordSettings
()
setting/system_setting/discord.go:19
← previousnext →601–700 of 9,514, ranked by callers