Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
15,592 in github.com/QuantumNous/new-api
⨍
Functions
15,592
◇
Types & classes
2,267
↓ 1 callers
Function
GetSetup
()
model/setup.go:9
↓ 1 callers
Function
GetStats
GetStats 获取统计信息
middleware/stats.go:37
↓ 1 callers
Function
GetSubscriptionPlanInfoByUserSubscriptionId
(userSubscriptionId int)
model/subscription.go:1503
↓ 1 callers
Function
GetSupportedEndpointMap
GetSupportedEndpointMap 返回全局端点到路径的映射
model/pricing.go:500
↓ 1 callers
Function
GetSystemTaskSetting
()
setting/operation_setting/system_task_setting.go:27
↓ 1 callers
Function
GetTask
(c *gin.Context)
controller/task.go:39
↓ 1 callers
Function
GetTaskForProtocolObservation
GetTaskForProtocolObservation reloads one public task through the ownership boundary used by long-lived plugin protocol observers. A missing task, for
model/task.go:504
↓ 1 callers
Function
GetTaskPlugin
(c *gin.Context)
controller/task_plugin.go:508
↓ 1 callers
Function
GetTaskPluginIcon
GetTaskPluginIcon serves a plugin logo as an image. The active override wins (or the requested ?version=), then the factory sidecar. Data icons are on
controller/task_plugin.go:480
↓ 1 callers
Function
GetTaskRequest
(c *gin.Context)
relay/common/relay_utils.go:124
↓ 1 callers
Function
GetTimeString
()
common/utils.go:243
↓ 1 callers
Function
GetTokenAutoGroups
(c *gin.Context)
controller/token.go:178
↓ 1 callers
Method
GetTokenCountMeta
()
relaykit/dto/openai_request.go:183
↓ 1 callers
Method
GetTokenCountMeta
()
relaykit/dto/embedding.go:35
↓ 1 callers
Method
GetTokenCountMeta
()
relaykit/dto/openai_image.go:167
↓ 1 callers
Function
GetTokenKey
(c *gin.Context)
controller/token.go:190
↓ 1 callers
Function
GetTokenKeysByIds
(ids []int, userId int)
model/token.go:478
↓ 1 callers
Function
GetTokenSetting
GetTokenSetting 获取令牌配置
setting/operation_setting/token_setting.go:21
↓ 1 callers
Method
GetTools
()
relaykit/dto/gemini.go:183
↓ 1 callers
Method
GetToolsMap
()
relaykit/dto/openai_request.go:1210
↓ 1 callers
Function
GetTwoFAStats
GetTwoFAStats 获取2FA统计信息(管理员使用)
model/twofa.go:340
↓ 1 callers
Function
GetUniqueByOnlyTaskId
GetUniqueByOnlyTaskId resolves a public task identifier only when exactly one row owns it. Historical task identifiers were not globally unique, so ca
model/task.go:458
↓ 1 callers
Method
GetUpstreamModelName
()
relay/common/relay_info.go:890
↓ 1 callers
Function
GetUptimeKumaGroups
()
setting/console_setting/validation.go:328
↓ 1 callers
Function
GetUsableGroupDescription
(groupName string)
setting/user_usable_group.go:47
↓ 1 callers
Function
GetUserByOAuthBinding
GetUserByOAuthBinding finds a user by provider ID and provider user ID
model/user_oauth_binding.go:41
↓ 1 callers
Function
GetUserCheckinRecords
GetUserCheckinRecords 获取用户在指定日期范围内的签到记录
model/checkin.go:32
↓ 1 callers
Function
GetUserCheckinStats
GetUserCheckinStats 获取用户签到统计信息
model/checkin.go:143
↓ 1 callers
Function
GetUserGroupRatio
GetUserGroupRatio 获取用户使用某个分组的倍率 userGroup 用户分组 group 需要获取倍率的分组
service/group.go:128
↓ 1 callers
Method
GetUserInfo
GetUserInfo retrieves user information using the access token
oauth/provider.go:23
↓ 1 callers
Function
GetUserLanguage
GetUserLanguage returns the user's language preference from cache Uses the existing GetUserCache mechanism for efficiency
model/user_cache.go:223
↓ 1 callers
Function
GetUserTopUps
(userId int, pageInfo *common.PageInfo)
model/topup.go:300
↓ 1 callers
Function
GetUserUsableGroupsCopy
()
setting/user_usable_group.go:19
↓ 1 callers
Method
GetVerifiedEmails
(ctx context.Context, token *OAuthToken)
oauth/provider.go:48
↓ 1 callers
Function
GroundingWebSearchQueries
GroundingWebSearchQueries returns the distinct hosted-search queries that Gemini reports for a response. The provider may repeat metadata across candi
relaykit/relayconvert/internal/gemini_chat/grounding.go:62
↓ 1 callers
Function
GroupGroupRatio2JSONString
()
setting/ratio_setting/group_ratio.go:100
↓ 1 callers
Function
GuessRelayFormatFromRequest
GuessRelayFormatFromRequest moved to convmeta with the converters; the delegation keeps host callers unchanged.
relay/common/request_conversion.go:10
↓ 1 callers
Function
HasActiveUserSubscription
HasActiveUserSubscription returns whether the user has any active subscription. This is a lightweight existence check to avoid heavy pre-consume trans
model/subscription.go:883
↓ 1 callers
Function
HasCustomProviderConflict
(name string)
oauth/registry.go:48
↓ 1 callers
Function
HasFunctionCallContent
(call *dto.FunctionCall)
relaykit/relayconvert/internal/shared/gemini/request.go:271
↓ 1 callers
Method
HasImage
()
relay/common/relay_info.go:1075
↓ 1 callers
Function
HasModelBillingConfig
(modelName string)
relay/helper/price.go:281
↓ 1 callers
Function
HasPriceOrRatioEntry
HasPriceOrRatioEntry reports whether name has a configured price, ratio, or tiered billing-mode entry after a single wildcard normalization. Self-use
relay/helper/price.go:298
↓ 1 callers
Method
HasTokens
()
relaykit/dto/openai_response.go:301
↓ 1 callers
Function
HasUnfinishedMidjourneyTasks
HasUnfinishedMidjourneyTasks reports whether at least one Midjourney task is still in progress. It is a cheap existence check (LIMIT 1) used to decide
model/midjourney.go:111
↓ 1 callers
Function
HmacSha256Raw
(message, key []byte)
common/hash.go:26
↓ 1 callers
Function
I18n
I18n middleware detects and sets the language preference for the request
middleware/i18n.go:13
↓ 1 callers
Function
IncrementDiskCacheHits
IncrementDiskCacheHits 增加磁盘缓存命中次数
common/disk_cache_config.go:137
↓ 1 callers
Function
IncrementMemoryBuffers
IncrementMemoryBuffers 增加内存缓存计数
common/disk_cache_config.go:125
↓ 1 callers
Function
IncrementMemoryCacheHits
IncrementMemoryCacheHits 增加内存缓存命中次数
common/disk_cache_config.go:142
↓ 1 callers
Method
Init
(info *relaycommon.RelayInfo)
relay/channel/providerplugin/adaptor.go:68
↓ 1 callers
Method
Init
(info *relaycommon.RelayInfo)
relay/channel/openai/adaptor.go:98
↓ 1 callers
Method
Init
(info *relaycommon.RelayInfo)
relay/channel/tencent/dispatch.go:19
↓ 1 callers
Method
Init
(info *relaycommon.RelayInfo)
relay/channel/vertex/adaptor.go:127
↓ 1 callers
Method
Init
(info *relaycommon.RelayInfo)
relay/channel/advancedcustom/adaptor.go:46
↓ 1 callers
Function
InitAc
(dict []string)
service/str.go:63
↓ 1 callers
Function
InitBatchUpdater
()
model/utils.go:34
↓ 1 callers
Function
InitEnv
()
common/init.go:32
↓ 1 callers
Function
InitPasswordEncryption
InitPasswordEncryption loads the shared login-encryption key from its dedicated store. Concurrent replicas converge through the unique slot.
model/password_crypto.go:25
↓ 1 callers
Function
InitRedisClient
InitRedisClient This function is called after init()
common/redis.go:24
↓ 1 callers
Function
InitResources
()
main.go:317
↓ 1 callers
Function
InitializeUserAuthVersions
InitializeUserAuthVersions must run after AutoMigrate when upgrading an existing database. It is idempotent and portable across all supported DBs.
model/user_auth_cache.go:269
↓ 1 callers
Function
InjectGoogleAnalytics
()
main.go:294
↓ 1 callers
Function
InjectUmamiAnalytics
()
main.go:274
↓ 1 callers
Method
Insert
Insert 新建组
model/prefill_group.go:90
↓ 1 callers
Method
Interval
()
service/system_task.go:45
↓ 1 callers
Function
InvalidateUserTokensCache
InvalidateUserTokensCache 清理指定用户所有令牌在 Redis 中的缓存, 配合 InvalidateUserCache 使用,可在用户被禁用/删除时立即阻断其令牌的请求。 下一次请求将从数据库重新加载令牌及用户状态,从而立即识别出被禁用的用户。
model/token.go:489
↓ 1 callers
Function
IsAlwaysSkipRetryCode
(errorCode types.ErrorCode)
setting/operation_setting/status_code_ranges.go:75
↓ 1 callers
Method
IsChannelEnabled
(channelID int, channelType int)
setting/model_setting/global.go:21
↓ 1 callers
Function
IsCurrencyDisplay
IsCurrencyDisplay 是否以货币形式展示(美元或人民币)
setting/operation_setting/general_setting.go:45
↓ 1 callers
Function
IsDiscordIdAlreadyTaken
(discordId string)
model/user.go:1192
↓ 1 callers
Function
IsEmailAlreadyTaken
(email string)
model/user.go:1152
↓ 1 callers
Function
IsEmailAvailable
(email string, excludeUserID int)
model/user.go:332
↓ 1 callers
Function
IsJsonObject
(str string)
common/str.go:72
↓ 1 callers
Function
IsKnownClaudeModel
(model string)
relaykit/relayconvert/reasoning/claude.go:416
↓ 1 callers
Function
IsLinuxDOIdAlreadyTaken
(linuxDOId string)
model/user.go:1533
↓ 1 callers
Function
IsModelConfiguredForGroups
IsModelConfiguredForGroups checks enabled and disabled channel abilities for the requested model and its routing name.
model/ability.go:52
↓ 1 callers
Function
IsOidcIdAlreadyTaken
(oidcId string)
model/user.go:1196
↓ 1 callers
Function
IsOpenAIResponseOnlyModel
(modelName string)
common/model.go:35
↓ 1 callers
Method
IsOpenRouterEnterprise
()
relaykit/dto/channel_settings.go:156
↓ 1 callers
Function
IsRecordErrorLog
(e *NewAPIError)
relaykit/types/error.go:416
↓ 1 callers
Method
IsRegistered
()
relaykit/types/file_source.go:24
↓ 1 callers
Method
IsRemoteImage
()
relaykit/dto/openai_request.go:634
↓ 1 callers
Method
IsStopped
IsStopped returns whether Stop() or Done() was called during this chunk.
relay/helper/stream_result.go:52
↓ 1 callers
Method
IsStream
(c *http.Request)
relaykit/dto/gemini.go:164
↓ 1 callers
Method
IsStringContent
()
relaykit/dto/openai_request.go:737
↓ 1 callers
Function
IsTelegramIdAlreadyTaken
(telegramId string)
model/user.go:1200
↓ 1 callers
Function
IsViolationFeeCode
(code types.ErrorCode)
service/violation_fee.go:26
↓ 1 callers
Method
JSONTextMember
JSONTextMember names the member of a hook result (a decoded requestBody, a request descriptor's body) that the host also takes as JSON text, for a plu
pluginkit/meta.go:400
↓ 1 callers
Function
JsonRawMessageToString
JsonRawMessageToString returns JSON strings as their decoded value and other JSON values as raw text.
common/json.go:111
↓ 1 callers
Method
LastRebuildError
()
pkg/jsplugin/registry.go:297
↓ 1 callers
Method
LastRebuildOutcome
()
pkg/jsplugin/registry.go:303
↓ 1 callers
Method
Len
()
types/set.go:26
↓ 1 callers
Function
ListActiveTaskPlugins
ListActiveTaskPlugins returns the enabled override rows without their source and icon payloads; see GetTaskPluginSyncSnapshot.
model/task_plugin.go:177
↓ 1 callers
Method
ListContainers
ListContainers retrieves all containers for a specific deployment
pkg/ionet/container.go:13
↓ 1 callers
Method
ListHardwareTypes
ListHardwareTypes retrieves available hardware types using the max GPUs endpoint
pkg/ionet/hardware.go:74
↓ 1 callers
Method
ListLocations
ListLocations retrieves available deployment locations (if supported by the API)
pkg/ionet/hardware.go:113
↓ 1 callers
Function
ListLoginSessions
(userID int, currentSID string)
service/auth_session.go:313
↓ 1 callers
Function
ListSystemTasks
(c *gin.Context)
controller/system_task.go:68
↓ 1 callers
Method
LoadPolicy
(m casbinmodel.Model)
service/authz/adapter.go:22
← previous
next →
5,401–5,500 of 15,592, ranked by callers