MCPcopy Create free account

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

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

↓ 5 callersFunctionseedPollingTask
(t *testing.T, channelID int, publicID string, upstreamID string)
service/task_polling_test.go:108
↓ 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:93
↓ 5 callersFunctionseedToken
(t *testing.T, db *gorm.DB, userID int, name string, rawKey string)
controller/token_test.go:163
↓ 5 callersFunctionsplitBillingExprAndRequestRules
(expr: string)
web/default/src/features/pricing/lib/billing-expr.ts:533
↓ 5 callersMethodstart
()
web/default/src/components/ai-elements/prompt-input.tsx:1051
↓ 5 callersFunctiontextRegistryChatResponse
()
service/relayconvert/response_registry_test.go:615
↓ 5 callersFunctiontoNumberOrNull
(value: unknown)
web/default/src/features/system-settings/models/model-pricing-core.ts:153
↓ 5 callersFunctionupdateChannel
( id: number, data: Partial<Channel> )
web/default/src/features/channels/api.ts:130
↓ 5 callersFunctionupdatePruneObjectsDraft
(operationId, updater)
web/classic/src/components/table/channels/modals/ParamOverrideEditorModal.jsx:1591
↓ 5 callersFunctionupsertModel
(name, updater)
web/classic/src/pages/Setting/Ratio/hooks/useModelPricingEditorState.js:758
↓ 5 callersFunctionuseBranch
()
web/default/src/components/ai-elements/branch.tsx:49
↓ 5 callersFunctionuseLogsViewScope
()
web/default/src/features/usage-logs/components/usage-logs-provider.tsx:94
↓ 4 callersFunctionAdminResetUserSubscriptionsByPlan
(userId int, planId int, advanceResetTime bool)
model/subscription.go:1066
↓ 4 callersFunctionApiSuccessI18n
ApiSuccessI18n returns a translated success message based on the user's language preference
common/gin.go:232
↓ 4 callersMethodApplyOtherRatiosToFloat
(value float64)
types/price_data.go:84
↓ 4 callersFunctionCallID
(item map[string]any)
service/relayconvert/internal/oai_responses/to_oai_chat_req.go:495
↓ 4 callersFunctionCapabilities
Capabilities returns the full resource/action matrix the subject is allowed.
service/authz/resolver.go:38
↓ 4 callersFunctionCommonClaudeHeadersOperation
(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo)
relay/channel/claude/adaptor.go:74
↓ 4 callersMethodConvertImageRequest
(c *gin.Context, info *relaycommon.RelayInfo, request dto.ImageRequest)
relay/channel/adapter.go:24
↓ 4 callersFunctionConvertRequestByID
(c *gin.Context, info *relaycommon.RelayInfo, converter string, request any)
service/request_converter.go:24
↓ 4 callersFunctionConvertStreamResponse
(c *gin.Context, info *relaycommon.RelayInfo, target types.RelayFormat, response any)
service/relayconvert/response_registry.go:245
↓ 4 callersFunctionCountUserSubscriptionsByPlan
(userId int, planId int)
model/subscription.go:413
↓ 4 callersFunctionCovertMjpActionToModelName
(mjAction string)
service/midjourney.go:22
↓ 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:412
↓ 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
()
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 callersFunctionGenerateStopResponse
(id string, createAt int64, model string, finishReason string)
relay/helper/common.go:202
↓ 4 callersFunctionGetBodyStorage
GetBodyStorage 获取请求体存储对象(用于需要多次读取的场景)
common/gin.go:86
↓ 4 callersFunctionGetChannelAffinityUsageCacheStats
(ruleName, usingGroup, keyFp string)
service/channel_affinity.go:790
↓ 4 callersFunctionGetCheckinSetting
GetCheckinSetting 获取签到配置
setting/operation_setting/checkin_setting.go:25
↓ 4 callersFunctionGetClaudeSettings
GetClaudeSettings 获取Claude配置
setting/model_setting/claude.go:43
↓ 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
↓ 4 callersFunctionGetDiskCacheThresholdBytes
GetDiskCacheThresholdBytes 获取磁盘缓存阈值(字节)
common/disk_cache_config.go:51
↓ 4 callersFunctionGetGroupRatio
(name string)
setting/ratio_setting/group_ratio.go:79
↓ 4 callersFunctionGetImageFromUrl
GetImageFromUrl 获取图片的类型和base64编码的数据
service/image.go:69
↓ 4 callersMethodGetNextEnabledKey
()
model/channel.go:199
↓ 4 callersFunctionGetOpenAIError
GetOpenAIError 从动态错误类型中提取OpenAIError结构
dto/openai_response.go:430
↓ 4 callersMethodGetOpenAIError
GetOpenAIError 从动态错误类型中提取OpenAIError结构
dto/openai_response.go:21
↓ 4 callersMethodGetSetting
()
model/user_cache.go:36
↓ 4 callersMethodGetText
()
dto/claude.go:43
↓ 4 callersFunctionGetTheme
()
common/constants.go:28
↓ 4 callersFunctionGetTokenByIds
(id int, userId int)
model/token.go:235
↓ 4 callersFunctionGetUserAutoGroup
GetUserAutoGroup 根据用户分组获取自动分组设置
service/group.go:45
↓ 4 callersFunctionGetUserSetting
GetUserSetting gets setting from Redis first, falls back to DB if needed
model/user.go:1016
↓ 4 callersMethodHasOtherRatio
(key string)
types/price_data.go:53
↓ 4 callersFunctionIncrementDiskFiles
IncrementDiskFiles 增加磁盘文件计数
common/disk_cache_config.go:109
↓ 4 callersFunctionInjectTieredBillingInfo
InjectTieredBillingInfo overlays tiered billing fields onto an existing module-specific other map. Call this after GenerateTextOtherInfo / GenerateCla
service/log_info_generate.go:306
↓ 4 callersMethodInsert
(inviterId int)
model/user.go:533
↓ 4 callersFunctionIsDiskCacheEnabled
IsDiskCacheEnabled 是否启用磁盘缓存
common/disk_cache_config.go:44
↓ 4 callersMethodIsStringSystem
()
dto/claude.go:465
↓ 4 callersMethodIsSuccess
()
dto/task.go:28
↓ 4 callersFunctionListModels
(c *gin.Context, modelType int)
controller/model.go:208
↓ 4 callersMethodLoadFromDB
LoadFromDB 从数据库加载配置
setting/config/config.go:42
↓ 4 callersFunctionLogDatabaseType
()
common/database.go:19
↓ 4 callersFunctionLookupResponseConverter
(converter string)
service/relayconvert/response_registry.go:192
↓ 4 callersFunctionNewChannelError
(channelId int, channelType int, channelName string, isMultiKey bool, usingKey string, autoBan bool)
types/channel_error.go:12
↓ 4 callersFunctionNewEstimatedGeminiChatBillingUsage
(usage *Usage)
dto/billing_usage.go:110
↓ 4 callersFunctionNewNotify
(t string, title string, content string, values []interface{})
dto/notify.go:18
↓ 4 callersFunctionNewSystemTaskProgressReporter
NewSystemTaskProgressReporter returns a throttled progress callback bound to a running task. Handlers call it with (processed, total) as they iterate
service/system_task.go:478
↓ 4 callersFunctionNormalizeResetPeriod
(period string)
model/subscription.go:335
↓ 4 callersFunctionNotifyUser
(userId int, userEmail string, userSetting dto.UserSetting, data dto.Notify)
service/user_notify.go:50
↓ 4 callersFunctionOaiResponsesHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay_responses.go:20
↓ 4 callersFunctionOaiResponsesStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/openai/relay_responses.go:72
↓ 4 callersFunctionObserveChannelAffinityUsageCacheByRelayFormat
ObserveChannelAffinityUsageCacheByRelayFormat records usage cache stats with a stable rate mode derived from relay format.
service/channel_affinity.go:778
↓ 4 callersMethodOtherRatioMultiplier
()
types/price_data.go:74
↓ 4 callersMethodParseInput
()
dto/embedding.go:58
↓ 4 callersFunctionPreConsumeBilling
PreConsumeBilling 根据用户计费偏好创建 BillingSession 并执行预扣费。 会话存储在 relayInfo.Billing 上,供后续 Settle / Refund 使用。
service/billing.go:20
↓ 4 callersFunctionQuotaRoundChecked
QuotaRoundChecked is QuotaRound but also returns a non-nil *QuotaClamp when the value was clamped, so billing callers can audit it.
common/quota_math.go:126
↓ 4 callersFunctionRegister
Register registers an OAuth provider with the given name
oauth/registry.go:19
↓ 4 callersMethodReplaceOtherRatios
(ratios map[string]float64)
types/price_data.go:45
↓ 4 callersMethodRequest
Request parameter duration's unit is seconds
common/rate-limit.go:45
↓ 4 callersFunctionResponsesResponseToChatCompletionsResponse
(resp *dto.OpenAIResponsesResponse, id string)
service/relayconvert/internal/oai_responses/to_oai_chat_resp.go:58
↓ 4 callersFunctionRouteTag
(tag string)
middleware/logger.go:12
↓ 4 callersMethodSaveToDB
SaveToDB 将配置保存到数据库
setting/config/config.go:71
↓ 4 callersMethodSetFirstResponseTime
()
relay/common/relay_info.go:664
↓ 4 callersMethodSetIndex
set index
dto/claude.go:509
↓ 4 callersFunctionSetLogDatabaseType
(databaseType DatabaseType)
common/database.go:27
↓ 4 callersMethodSetMediaContent
(content []MediaContent)
dto/openai_request.go:514
↓ 4 callersMethodSetSetting
(setting dto.UserSetting)
model/user.go:93
↓ 4 callersMethodSetStringContent
(content string)
dto/claude.go:161
↓ 4 callersMethodSetUsage
(usage *dto.Usage)
service/relayconvert/response_registry.go:381
↓ 4 callersFunctionSettleBilling
--------------------------------------------------------------------------- SettleBilling — 后结算辅助函数 --------------------------------------------------
service/billing.go:51
↓ 4 callersFunctionSetupContextForSelectedChannel
(c *gin.Context, channel *model.Channel, modelName string)
middleware/distributor.go:443
↓ 4 callersFunctionShouldCopyUpstreamHeader
ShouldCopyUpstreamHeader checks whether a given upstream response header should be copied to the client response. It returns false for Content-Length
service/http.go:31
↓ 4 callersFunctionShouldSkipRetryAfterChannelAffinityFailure
(c *gin.Context)
service/channel_affinity.go:626
↓ 4 callersMethodSnapshot
()
model/task.go:402
↓ 4 callersFunctionStrToMap
(str string)
common/str.go:56
↓ 4 callersFunctionStringsContains
(strs []string, str string)
common/str.go:92
↓ 4 callersFunctionTaskModel2Dto
(task *model.Task)
relay/relay_task.go:550
↓ 4 callersMethodToFileSource
()
dto/gemini.go:209
↓ 4 callersFunctionUpdateSystemTaskState
(taskID string, lockedBy string, state any)
model/system_task.go:309
← previousnext →601–700 of 10,602, ranked by callers