Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
9,514 in github.com/QuantumNous/new-api
⨍
Functions
9,514
◇
Types & classes
1,507
↓ 2 callers
Function
GenerateTaskID
GenerateTaskID 生成对外暴露的 task_xxxx 格式 ID
model/task.go:144
↓ 2 callers
Function
Get2FAIssuer
Get2FAIssuer 获取2FA发行者名称
common/totp.go:115
↓ 2 callers
Function
GetAllCustomOAuthProviders
GetAllCustomOAuthProviders returns all custom OAuth providers
model/custom_oauth_provider.go:74
↓ 2 callers
Function
GetAllFlowQuotaDates
(c *gin.Context)
controller/usedata.go:88
↓ 2 callers
Function
GetAllUserSubscriptions
GetAllUserSubscriptions returns all subscriptions (active and expired) for a user.
model/subscription.go:888
↓ 2 callers
Function
GetAllUsers
(pageInfo *common.PageInfo, sortOptions ...UserSortOptions)
model/user.go:349
↓ 2 callers
Function
GetAndValidateClaudeRequest
(c *gin.Context)
relay/helper/valid_request.go:289
↓ 2 callers
Function
GetAndValidateGeminiRequest
(c *gin.Context)
relay/helper/valid_request.go:370
↓ 2 callers
Function
GetAndValidateResponsesRequest
(c *gin.Context)
relay/helper/valid_request.go:133
↓ 2 callers
Function
GetAndValidateTextRequest
(c *gin.Context, relayMode int)
relay/helper/valid_request.go:312
↓ 2 callers
Function
GetAutoGroups
()
setting/auto_group.go:47
↓ 2 callers
Method
GetBudgetTokens
()
relaykit/dto/claude.go:457
↓ 2 callers
Function
GetByOnlyMJId
(mjId string)
model/midjourney.go:117
↓ 2 callers
Function
GetCacheRatio
GetCacheRatio returns the cache ratio for a model
setting/ratio_setting/cache_ratio.go:159
↓ 2 callers
Method
GetChannelID
()
relaykit/relayconvert/convmeta/meta.go:24
↓ 2 callers
Method
GetChannelName
()
relay/channel/adapter.go:30
↓ 2 callers
Function
GetChannelTypeName
(channelType int)
constant/channel.go:189
↓ 2 callers
Function
GetChannelsByIds
(ids []int)
model/channel.go:1051
↓ 2 callers
Function
GetChannelsByTag
(tag string, idSort bool, selectAll bool, sortOptions ...ChannelSortOptions)
model/channel.go:368
↓ 2 callers
Method
GetClaudeError
GetClaudeError 从动态错误类型中提取ClaudeError结构
relaykit/dto/claude.go:521
↓ 2 callers
Method
GetContainerLogsRaw
GetContainerLogsRaw retrieves the raw text logs for a specific container
pkg/ionet/container.go:152
↓ 2 callers
Function
GetContextKeyInt
(c *gin.Context, key constant.ContextKey)
common/gin.go:169
↓ 2 callers
Function
GetCreateCacheRatio
(name string)
setting/ratio_setting/cache_ratio.go:167
↓ 2 callers
Function
GetDiskCacheMaxSizeBytes
GetDiskCacheMaxSizeBytes 获取磁盘缓存最大大小(字节)
common/disk_cache_config.go:58
↓ 2 callers
Function
GetDiskCacheStats
GetDiskCacheStats 获取缓存统计信息
common/disk_cache_config.go:94
↓ 2 callers
Function
GetDiskSpaceInfo
GetDiskSpaceInfo 获取缓存目录所在磁盘的空间信息 (Windows)
common/system_monitor_windows.go:12
↓ 2 callers
Function
GetEnabledModels
()
model/ability.go:50
↓ 2 callers
Method
GetErrorType
()
relaykit/types/error.go:116
↓ 2 callers
Function
GetExposedData
()
setting/ratio_setting/exposed_cache.go:35
↓ 2 callers
Method
GetFile
()
relaykit/dto/openai_request.go:360
↓ 2 callers
Function
GetGroupRatioSetting
()
setting/ratio_setting/group_ratio.go:54
↓ 2 callers
Function
GetGroupsEnabledModels
GetGroupsEnabledModels 按 groups 顺序获取各分组启用的模型并去重
service/group.go:110
↓ 2 callers
Method
GetHeaderOverride
()
model/channel.go:1040
↓ 2 callers
Function
GetImageRatio
(name string)
setting/ratio_setting/model_ratio.go:670
↓ 2 callers
Method
GetInputAudio
()
relaykit/dto/openai_request.go:344
↓ 2 callers
Function
GetJsonType
(data json.RawMessage)
common/json.go:25
↓ 2 callers
Function
GetLatestSystemTasks
(taskTypes []string)
model/system_task.go:205
↓ 2 callers
Method
GetMaxGPUsPerContainer
GetMaxGPUsPerContainer retrieves the maximum number of GPUs available per hardware type
pkg/ionet/hardware.go:59
↓ 2 callers
Function
GetMaxUserId
()
model/user.go:343
↓ 2 callers
Function
GetMaxUserTokens
GetMaxUserTokens 获取每用户最大令牌数量
setting/operation_setting/token_setting.go:26
↓ 2 callers
Method
GetModelLimitsMap
()
model/token.go:373
↓ 2 callers
Function
GetModelSupportEndpointTypes
(model string)
model/pricing.go:98
↓ 2 callers
Method
GetOpenAIError
GetOpenAIError 从动态错误类型中提取OpenAIError结构
relaykit/dto/openai_response.go:319
↓ 2 callers
Method
GetOtherInfo
()
model/channel.go:307
↓ 2 callers
Function
GetPaginatedChannelTags
(query *gorm.DB, offset int, limit int)
model/channel.go:890
↓ 2 callers
Method
GetPreConsumedQuota
GetPreConsumedQuota 返回实际预扣的额度。
service/billing_session.go:148
↓ 2 callers
Method
GetPreConsumedQuota
GetPreConsumedQuota 返回实际预扣的额度值(信任用户可能为 0)。
relay/common/billing.go:20
↓ 2 callers
Function
GetPreferredModelOwnerChannelTypes
(modelNames []string, groups []string)
model/model_meta.go:155
↓ 2 callers
Method
GetPriority
()
model/channel.go:483
↓ 2 callers
Function
GetProvider
GetProvider returns the OAuth provider for the given name
oauth/registry.go:42
↓ 2 callers
Method
GetProviderId
GetProviderId returns the provider ID for binding purposes
oauth/generic.go:316
↓ 2 callers
Function
GetRandomInt
(max int)
common/utils.go:259
↓ 2 callers
Method
GetReasoningEffort
()
relaykit/relayconvert/convmeta/meta.go:27
↓ 2 callers
Function
GetRedemptionById
(id int)
model/redemption.go:127
↓ 2 callers
Function
GetRequestURL
(info *relaycommon.RelayInfo)
relay/channel/minimax/relay-minimax.go:12
↓ 2 callers
Method
GetRequestURL
(info *relaycommon.RelayInfo)
relay/channel/submodel/adaptor.go:39
↓ 2 callers
Function
GetSetting
()
setting/perf_metrics_setting/config.go:23
↓ 2 callers
Function
GetStatus
(c *gin.Context)
controller/misc.go:44
↓ 2 callers
Method
GetStringContent
()
relaykit/dto/claude.go:134
↓ 2 callers
Method
GetSystemFingerprint
()
relaykit/dto/openai_response.go:200
↓ 2 callers
Function
GetToken
(c *gin.Context)
controller/token.go:150
↓ 2 callers
Function
GetUnusedBackupCodeCount
GetUnusedBackupCodeCount 获取未使用的备用码数量
model/twofa.go:271
↓ 2 callers
Function
GetUserFlowQuotaDates
(c *gin.Context)
controller/usedata.go:107
↓ 2 callers
Function
GetUserIdByAffCode
(affCode string)
model/user.go:467
↓ 2 callers
Method
GetUserInfo
GetUserInfo retrieves user information using the access token
oauth/provider.go:23
↓ 2 callers
Function
GetUserModels
(c *gin.Context)
controller/user.go:638
↓ 2 callers
Function
GetUserUsedQuota
(id int)
model/user.go:1156
↓ 2 callers
Function
GetVendorModelCounts
()
model/model_meta.go:89
↓ 2 callers
Function
GetVendors
GetVendors 返回当前定价接口使用到的供应商信息
model/pricing.go:90
↓ 2 callers
Method
GetVideoUrl
()
relaykit/dto/openai_request.go:377
↓ 2 callers
Function
GetWaffoPayMethods
GetWaffoPayMethods 从 options 读取 Waffo 支付方式配置
setting/payment_waffo.go:27
↓ 2 callers
Function
GlobalAPIRateLimit
()
middleware/rate-limit.go:167
↓ 2 callers
Function
GroupInUserUsableGroups
(userGroup, groupName string)
service/group.go:43
↓ 2 callers
Function
GuessRelayFormatFromRequest
GuessRelayFormatFromRequest infers the relay format from a request DTO's concrete type. Moved from relay/common (which keeps a delegating alias).
relaykit/relayconvert/convmeta/format.go:10
↓ 2 callers
Function
HandleFinalResponse
(c *gin.Context, info *relaycommon.RelayInfo, lastStreamData string, responseId string, createAt int64, model
relay/channel/openai/helper.go:162
↓ 2 callers
Function
HandleStreamFinalResponse
(c *gin.Context, info *relaycommon.RelayInfo, claudeInfo *ClaudeResponseInfo)
relay/channel/claude/relay-claude.go:153
↓ 2 callers
Function
HandleStreamFormat
辅助函数
relay/channel/openai/helper.go:23
↓ 2 callers
Function
HandleStreamResponseData
(c *gin.Context, info *relaycommon.RelayInfo, claudeInfo *ClaudeResponseInfo, data string)
relay/channel/claude/relay-claude.go:86
↓ 2 callers
Function
HasCSAMViolationMarker
(err *types.NewAPIError)
service/violation_fee.go:30
↓ 2 callers
Method
HasCache
()
relaykit/types/file_source.go:21
↓ 2 callers
Function
HasCheckedInToday
HasCheckedInToday 检查用户今天是否已签到
model/checkin.go:43
↓ 2 callers
Function
HasModelBillingConfig
(modelName string)
relay/helper/price.go:255
↓ 2 callers
Function
InitDB
()
model/main.go:171
↓ 2 callers
Function
InitHttpClient
()
service/http_client.go:116
↓ 2 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:239
↓ 2 callers
Function
InputItems
(raw []byte)
relaykit/relayconvert/internal/oai_responses/req_helpers.go:57
↓ 2 callers
Method
Insert
()
model/midjourney.go:161
↓ 2 callers
Method
Insert
()
model/model_meta.go:47
↓ 2 callers
Method
Insert
()
model/task.go:366
↓ 2 callers
Method
InsertWithTx
InsertWithTx inserts a new user within an existing transaction. This is used for OAuth registration where user creation and binding need to be atomic.
model/user.go:656
↓ 2 callers
Function
InvalidateCache
InvalidateCache clears the compiled-expression cache. Called when billing rules are updated.
pkg/billingexpr/compile.go:171
↓ 2 callers
Function
IsAdmin
(userId int)
model/user.go:1099
↓ 2 callers
Function
IsAdvancedCustomConverterAllowed
(converter string)
relaykit/dto/channel_settings.go:337
↓ 2 callers
Function
IsChannelEnabledForGroupModel
(group string, modelName string, channelID int)
model/channel_satisfy.go:8
↓ 2 callers
Function
IsChannelError
(err *NewAPIError)
relaykit/types/error.go:366
↓ 2 callers
Function
IsCustomProvider
IsCustomProvider checks if a provider is a custom provider
oauth/registry.go:83
↓ 2 callers
Method
IsDisk
IsDisk 是否是磁盘存储
common/body_storage.go:22
↓ 2 callers
Method
IsEnabled
IsEnabled returns whether this OAuth provider is enabled
oauth/provider.go:16
↓ 2 callers
Function
IsExposeRatioEnabled
()
setting/ratio_setting/expose_ratio.go:15
↓ 2 callers
Method
IsFinished
()
relaykit/dto/openai_response.go:152
← previous
next →
1,401–1,500 of 9,514, ranked by callers