MCPcopy Create free account

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

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

↓ 2 callersFunctionDefaultInt
DefaultInt returns val if non-zero, otherwise fallback.
relay/channel/task/taskcommon/helpers.go:41
↓ 2 callersFunctionDefaultString
DefaultString returns val if non-empty, otherwise fallback.
relay/channel/task/taskcommon/helpers.go:33
↓ 2 callersMethodDelete
Delete 删除2FA设置
model/twofa.go:97
↓ 2 callersMethodDelete
()
model/redemption.go:206
↓ 2 callersMethodDelete
()
model/token.go:324
↓ 2 callersFunctionDeleteOldLogBatch
(ctx context.Context, targetTimestamp int64, limit int)
model/log.go:703
↓ 2 callersFunctionDeletePasskeyByUserID
(userID int)
model/passkey.go:199
↓ 2 callersFunctionDeleteUserOAuthBinding
DeleteUserOAuthBinding deletes an OAuth binding
model/user_oauth_binding.go:133
↓ 2 callersFunctionDisableCache
()
middleware/disable-cache.go:5
↓ 2 callersFunctionDisableChannel
disable & notify
service/channel.go:19
↓ 2 callersFunctionDisableTwoFA
DisableTwoFA 禁用用户的2FA
model/twofa.go:213
↓ 2 callersFunctionDoFormRequest
(a Adaptor, c *gin.Context, info *common.RelayInfo, requestBody io.Reader)
relay/channel/api_request.go:337
↓ 2 callersFunctionDoWssRequest
(a Adaptor, c *gin.Context, info *common.RelayInfo, requestBody io.Reader)
relay/channel/api_request.go:369
↓ 2 callersMethodEditWithTx
(tx *gorm.DB, updatePassword bool)
model/user.go:680
↓ 2 callersMethodError
()
oauth/linuxdo.go:193
↓ 2 callersFunctionEstimateTokenByModel
(model, text string)
service/token_estimator.go:216
↓ 2 callersMethodExchangeToken
ExchangeToken exchanges the authorization code for an access token The gin.Context is passed for providers that need request info (e.g., for redirect_
oauth/provider.go:20
↓ 2 callersFunctionExpireStaleSystemTaskLocks
(now int64)
model/system_task.go:360
↓ 2 callersFunctionExplicitUserOverrides
ExplicitUserOverrides returns only the per-user override entries.
service/authz/override.go:108
↓ 2 callersFunctionExtendWriteDeadline
ExtendWriteDeadline pushes the connection write deadline forward before each stream write. Best-effort: writers that don't support deadlines (e.g. htt
relay/helper/stream_scanner.go:70
↓ 2 callersFunctionFetchGeminiModels
(baseURL, apiKey, proxyURL string)
relay/channel/gemini/relay-gemini.go:481
↓ 2 callersFunctionFetchOllamaModels
(baseURL, apiKey string)
relay/channel/ollama/relay-ollama.go:281
↓ 2 callersMethodFetchTask
(baseURL string, key string, body map[string]any, proxy string)
service/task_polling.go:29
↓ 2 callersFunctionFindEarliestPendingSystemTasks
(taskTypes []string)
model/system_task.go:158
↓ 2 callersFunctionFixAbility
()
model/ability.go:337
↓ 2 callersFunctionGeminiChatStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini.go:195
↓ 2 callersFunctionGeminiImageHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini.go:422
↓ 2 callersFunctionGeminiResponsesStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay_responses.go:81
↓ 2 callersFunctionGeminiTextGenerationStreamHandler
(c *gin.Context, info *relaycommon.RelayInfo, resp *http.Response)
relay/channel/gemini/relay-gemini-native.go:81
↓ 2 callersFunctionGenerateBackupCodes
GenerateBackupCodes 生成备用恢复码
common/totp.go:49
↓ 2 callersFunctionGenerateKey
()
common/utils.go:254
↓ 2 callersFunctionGenerateMjOtherInfo
(relayInfo *relaycommon.RelayInfo, priceData types.PriceData)
service/log_info_generate.go:292
↓ 2 callersFunctionGenerateStartEmptyResponse
(id string, createAt int64, model string, systemFingerprint *string)
relay/helper/common.go:184
↓ 2 callersFunctionGenerateTaskID
GenerateTaskID 生成对外暴露的 task_xxxx 格式 ID
model/task.go:140
↓ 2 callersFunctionGet2FAIssuer
Get2FAIssuer 获取2FA发行者名称
common/totp.go:115
↓ 2 callersFunctionGetAllCustomOAuthProviders
GetAllCustomOAuthProviders returns all custom OAuth providers
model/custom_oauth_provider.go:74
↓ 2 callersFunctionGetAllFlowQuotaDates
(c *gin.Context)
controller/usedata.go:88
↓ 2 callersFunctionGetAllUserSubscriptions
GetAllUserSubscriptions returns all subscriptions (active and expired) for a user.
model/subscription.go:873
↓ 2 callersFunctionGetAndValidateClaudeRequest
(c *gin.Context)
relay/helper/valid_request.go:267
↓ 2 callersFunctionGetAndValidateGeminiRequest
(c *gin.Context)
relay/helper/valid_request.go:348
↓ 2 callersFunctionGetAndValidateResponsesRequest
(c *gin.Context)
relay/helper/valid_request.go:131
↓ 2 callersFunctionGetAndValidateTextRequest
(c *gin.Context, relayMode int)
relay/helper/valid_request.go:290
↓ 2 callersFunctionGetAutoGroups
()
setting/auto_group.go:35
↓ 2 callersFunctionGetBase64Data
GetBase64Data 获取 base64 编码的数据
service/file_service.go:418
↓ 2 callersMethodGetBudgetTokens
()
dto/claude.go:458
↓ 2 callersFunctionGetByOnlyMJId
(mjId string)
model/midjourney.go:117
↓ 2 callersFunctionGetCacheRatio
GetCacheRatio returns the cache ratio for a model
setting/ratio_setting/cache_ratio.go:159
↓ 2 callersMethodGetChannelName
()
relay/channel/adapter.go:29
↓ 2 callersFunctionGetChannelsByIds
(ids []int)
model/channel.go:1034
↓ 2 callersFunctionGetChannelsByTag
(tag string, idSort bool, selectAll bool, sortOptions ...ChannelSortOptions)
model/channel.go:368
↓ 2 callersMethodGetClaudeError
GetClaudeError 从动态错误类型中提取ClaudeError结构
dto/claude.go:522
↓ 2 callersMethodGetContainerLogsRaw
GetContainerLogsRaw retrieves the raw text logs for a specific container
pkg/ionet/container.go:152
↓ 2 callersFunctionGetContextKey
(c *gin.Context, key constant.ContextKey)
common/gin.go:161
↓ 2 callersFunctionGetContextKeyInt
(c *gin.Context, key constant.ContextKey)
common/gin.go:169
↓ 2 callersFunctionGetCreateCacheRatio
(name string)
setting/ratio_setting/cache_ratio.go:167
↓ 2 callersFunctionGetDiskCacheMaxSizeBytes
GetDiskCacheMaxSizeBytes 获取磁盘缓存最大大小(字节)
common/disk_cache_config.go:58
↓ 2 callersFunctionGetDiskCacheStats
GetDiskCacheStats 获取缓存统计信息
common/disk_cache_config.go:94
↓ 2 callersFunctionGetDiskSpaceInfo
GetDiskSpaceInfo 获取缓存目录所在磁盘的空间信息 (Windows)
common/system_monitor_windows.go:12
↓ 2 callersFunctionGetEnabledModels
()
model/ability.go:50
↓ 2 callersMethodGetErrorType
()
types/error.go:116
↓ 2 callersFunctionGetExposedData
()
setting/ratio_setting/exposed_cache.go:35
↓ 2 callersMethodGetFile
()
dto/openai_request.go:344
↓ 2 callersFunctionGetGPTImage1PriceOnceCall
(quality string, size string)
setting/operation_setting/tools.go:163
↓ 2 callersFunctionGetGeminiSafetySetting
GetGeminiSafetySetting 获取安全设置
setting/model_setting/gemini.go:54
↓ 2 callersFunctionGetGroupEnabledModels
(group string)
model/ability.go:43
↓ 2 callersMethodGetHeaderOverride
()
model/channel.go:1023
↓ 2 callersFunctionGetImageRatio
(name string)
setting/ratio_setting/model_ratio.go:670
↓ 2 callersMethodGetInputAudio
()
dto/openai_request.go:328
↓ 2 callersFunctionGetLatestSystemTasks
(taskTypes []string)
model/system_task.go:205
↓ 2 callersMethodGetMaxGPUsPerContainer
GetMaxGPUsPerContainer retrieves the maximum number of GPUs available per hardware type
pkg/ionet/hardware.go:59
↓ 2 callersFunctionGetMaxUserId
()
model/user.go:283
↓ 2 callersFunctionGetMaxUserTokens
GetMaxUserTokens 获取每用户最大令牌数量
setting/operation_setting/token_setting.go:26
↓ 2 callersMethodGetModelLimitsMap
()
model/token.go:350
↓ 2 callersFunctionGetModelSupportEndpointTypes
(model string)
model/pricing.go:98
↓ 2 callersMethodGetOpenAIError
GetOpenAIError 从动态错误类型中提取OpenAIError结构
dto/openai_response.go:319
↓ 2 callersMethodGetOtherInfo
()
model/channel.go:307
↓ 2 callersFunctionGetPaginatedChannelTags
(query *gorm.DB, offset int, limit int)
model/channel.go:884
↓ 2 callersFunctionGetPreferredModelOwnerChannelTypes
(modelNames []string, groups []string)
model/model_meta.go:155
↓ 2 callersMethodGetPriority
()
model/channel.go:477
↓ 2 callersMethodGetProviderId
GetProviderId returns the provider ID for binding purposes
oauth/generic.go:316
↓ 2 callersMethodGetQuality
()
dto/openai_response.go:335
↓ 2 callersFunctionGetRandomInt
(max int)
common/utils.go:259
↓ 2 callersFunctionGetRedemptionById
(id int)
model/redemption.go:127
↓ 2 callersFunctionGetRequestURL
(info *relaycommon.RelayInfo)
relay/channel/minimax/relay-minimax.go:12
↓ 2 callersFunctionGetSetting
()
setting/perf_metrics_setting/config.go:23
↓ 2 callersMethodGetSize
()
dto/openai_response.go:347
↓ 2 callersMethodGetStringContent
()
dto/claude.go:135
↓ 2 callersMethodGetSystemFingerprint
()
dto/openai_response.go:200
↓ 2 callersFunctionGetUserFlowQuotaDates
(c *gin.Context)
controller/usedata.go:107
↓ 2 callersFunctionGetUserIdByAffCode
(affCode string)
model/user.go:405
↓ 2 callersMethodGetUserInfo
GetUserInfo retrieves user information using the access token
oauth/provider.go:23
↓ 2 callersFunctionGetUserUsedQuota
(id int)
model/user.go:977
↓ 2 callersFunctionGetVendorModelCounts
()
model/model_meta.go:89
↓ 2 callersFunctionGetVendors
GetVendors 返回当前定价接口使用到的供应商信息
model/pricing.go:90
↓ 2 callersMethodGetVideoUrl
()
dto/openai_request.go:361
↓ 2 callersFunctionGetWaffoPayMethods
GetWaffoPayMethods 从 options 读取 Waffo 支付方式配置
setting/payment_waffo.go:27
↓ 2 callersFunctionGlobalAPIRateLimit
()
middleware/rate-limit.go:97
↓ 2 callersFunctionHandleClaudeResponseData
(c *gin.Context, info *relaycommon.RelayInfo, claudeInfo *ClaudeResponseInfo, httpResp *http.Response, data []
relay/channel/claude/relay-claude.go:197
↓ 2 callersFunctionHandleFinalResponse
(c *gin.Context, info *relaycommon.RelayInfo, lastStreamData string, responseId string, createAt int64, model
relay/channel/openai/helper.go:162
↓ 2 callersFunctionHandleStreamFinalResponse
(c *gin.Context, info *relaycommon.RelayInfo, claudeInfo *ClaudeResponseInfo)
relay/channel/claude/relay-claude.go:133
← previousnext →1,301–1,400 of 10,602, ranked by callers