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
↓ 2 callers
Function
tokenBatchAuditParams
(c *gin.Context, ids []int)
controller/audit.go:196
↓ 2 callers
Function
tokenize
(input: string)
web/src/features/home/components/hero-terminal-demo.tsx:459
↓ 2 callers
Method
tokens
()
controller/provider_plugin_test.go:68
↓ 2 callers
Method
toolItem
(event *dto.ResponsesStreamResponse)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:307
↓ 2 callers
Method
toolOutput
(tool *chatToResponsesStreamTool, status string)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:894
↓ 2 callers
Function
topBar
()
web/src/features/system-settings/models/__tests__/price-changes.test.tsx:129
↓ 2 callers
Function
topUpQueryCutoff
topUpQueryCutoff 返回允许查询的最早 create_time(秒级 Unix 时间戳)。
model/topup.go:296
↓ 2 callers
Function
topUpQuotaMaxCurrent
(creditedQuota int)
model/topup.go:61
↓ 2 callers
Method
touch
touch restarts the idle timer on upstream data.
relay/channel/providerplugin/stream.go:170
↓ 2 callers
Function
transformApiKeyToFormDefaults
( apiKey: ApiKey, availableAutoGroups: string[] = [], maxAutoGroups = 5 )
web/src/features/keys/lib/api-key-form.ts:169
↓ 2 callers
Function
transformFormDataToPayload
( data: ApiKeyFormValues )
web/src/features/keys/lib/api-key-form.ts:141
↓ 2 callers
Function
transformUserToFormDefaults
(user: User)
web/src/features/users/lib/user-form.ts:115
↓ 2 callers
Method
transportFor
(proxyURL *url.URL)
service/protected_fetch_client.go:124
↓ 2 callers
Function
trimMessages
(messages: Message[])
web/src/features/playground/lib/storage/storage.ts:106
↓ 2 callers
Function
truncateAuthMetadata
(value string, max int)
service/auth_session.go:455
↓ 2 callers
Function
tryParseOperations
(paramOverride map[string]any)
relay/common/override.go:595
↓ 2 callers
Function
tryParseRequestConditions
( conditionStr: string )
web/src/features/pricing/lib/billing-expr.ts:536
↓ 2 callers
Function
tryParseVisualConfig
( exprStr: string | null | undefined )
web/src/features/pricing/lib/tier-expr.ts:176
↓ 2 callers
Function
uid
()
web/src/features/system-settings/models/group-special-usable-editor.tsx:67
↓ 2 callers
Function
unmarshalBodyReusable
(c *gin.Context, v any, noCopy bool)
common/gin.go:130
↓ 2 callers
Method
unobserve
()
web/src/test-setup.ts:92
↓ 2 callers
Function
unrecognizedPollDetail
unrecognizedPollDetail pairs the plugin's reason with a bounded copy of the upstream body so the WARN line is enough to diagnose a parser gap.
service/task_polling.go:851
↓ 2 callers
Function
update
(changes: Partial<OrderOptions>)
web/src/features/models/components/dialogs/model-square-order-dialog.tsx:148
↓ 2 callers
Function
updateAdminPermissionsForUserInTx
(c *gin.Context, tx *gorm.DB, userID int, userRole int, permissions map[string]map[string]bool)
controller/user.go:1070
↓ 2 callers
Function
updateAuth
( field: Exclude<keyof NonNullable<AdvancedCustomRoute['auth']>, 'type'>, value: string )
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:1016
↓ 2 callers
Function
updateBalanceInRun
updateBalanceInRun queries one enabled channel in an update of all balances and disables what has none left, when the channel's automatic disabling is
controller/channel_balance.go:197
↓ 2 callers
Function
updateBatchTasks
(ctx context.Context, adaptor BatchTaskPollingAdaptor, channelId int, taskIds []string, taskM map[string]*mode
service/task_polling.go:271
↓ 2 callers
Function
updateChannelBalance
( id: number )
web/src/features/channels/api.ts:358
↓ 2 callers
Function
updateChannelStatus
( id: number, status: number )
web/src/features/channels/api.ts:276
↓ 2 callers
Function
updateChannelUpstreamModelSettings
(channel *model.Channel, settings dto.ChannelOtherSettings, updateModels bool)
controller/channel_upstream_update.go:583
↓ 2 callers
Function
updateChannelUsedQuota
(id int, quota int)
model/channel.go:1080
↓ 2 callers
Function
updateConfigFromMap
辅助函数:从map更新配置对象
setting/config/config.go:165
↓ 2 callers
Function
updateLastAssistantMessage
( messages: Message[], updater: (message: Message) => Message )
web/src/features/playground/lib/message/message-update-utils.ts:51
↓ 2 callers
Function
updatePluginChannelBalance
updatePluginChannelBalance queries the balance of a task plugin channel with its plugin's balance hooks, each key line of a multi-key channel on its o
controller/channel_balance.go:89
↓ 2 callers
Function
updatePricing
()
model/pricing.go:217
↓ 2 callers
Function
updateSystemOption
(request: UpdateOptionRequest)
web/src/features/system-settings/api.ts:42
↓ 2 callers
Function
upsertPasskeyCredentialWithAuthVersion
(credential *PasskeyCredential, identity *AuthSessionIdentity)
model/passkey.go:232
↓ 2 callers
Function
upstreamBody
upstreamBody is the body a convertRequest result sends and its content type: the result's body, a multipart form of its fields and the client files it
relay/channel/providerplugin/adaptor.go:335
↓ 2 callers
Function
upstreamErrorResponse
upstreamErrorResponse is the error a converter hook returned, as an upstream response in the OpenAI error format, so that the host's error handling an
relay/channel/providerplugin/adaptor.go:790
↓ 2 callers
Function
urlFor
(ctx, action)
plugins/tasks/kling/plugin.js:177
↓ 2 callers
Function
usablePerfMetricGroups
(c *gin.Context)
controller/perf_metrics.go:17
↓ 2 callers
Function
usageBillingPathForLog
(isLocalCountTokens bool, usage *dto.Usage)
service/billing_usage.go:26
↓ 2 callers
Function
usageCompletionTokens
(usage *dto.Usage)
service/channel_affinity.go:960
↓ 2 callers
Function
usageExampleNumber
(value any)
pluginkit/meta.go:1841
↓ 2 callers
Function
usageFromBillingUsage
(usage *dto.Usage)
service/billing_usage.go:63
↓ 2 callers
Function
usageFromResponsesUsage
(src *dto.Usage, createBillingSnapshot bool)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp.go:195
↓ 2 callers
Function
usagePromptTokens
(usage *dto.Usage)
service/channel_affinity.go:950
↓ 2 callers
Method
usageRatios
(ctx context.Context, models []string, hook string, args ...any)
relay/channel/task/jsplugin/adaptor.go:1650
↓ 2 callers
Function
useActiveChatKey
(enabled: boolean)
web/src/features/chat/hooks/use-active-chat-key.ts:53
↓ 2 callers
Function
useApiKeysColumns
(now: number)
web/src/features/keys/components/api-keys-columns.tsx:70
↓ 2 callers
Function
useChannelBalanceQueryable
( channel: Pick<Channel, 'type' | 'setting'> )
web/src/features/channels/hooks/use-task-plugin-option.ts:85
↓ 2 callers
Function
useChannelKeyDisclosure
( open: boolean, channelId: number | null )
web/src/features/channels/hooks/use-channel-key-disclosure.ts:30
↓ 2 callers
Function
useChannelModelFetchable
( channel: Pick<Channel, 'type' | 'setting'> )
web/src/features/channels/hooks/use-task-plugin-option.ts:65
↓ 2 callers
Function
useChannelsColumns
( options: { enableSelection?: boolean } = {} )
web/src/features/channels/components/channels-columns.tsx:672
↓ 2 callers
Function
useChart
()
web/src/components/ui/chart.tsx:48
↓ 2 callers
Function
useComboboxAnchor
()
web/src/components/ui/combobox.tsx:471
↓ 2 callers
Function
useControllableState
({ prop, defaultProp, onChange, }: { prop?: T | undefined defaultProp?: T | undefined onChange?: (
web/src/lib/use-controllable-state.ts:46
↓ 2 callers
Method
useCredentialLine
useCredentialLine switches the request to a refreshed credential line, also for the error handling that finds the key by its line.
relay/channel/providerplugin/adaptor.go:569
↓ 2 callers
Function
useDataTableViewMode
( options: UseDataTableViewModeOptions = {} )
web/src/components/data-table/hooks/use-data-table-view-mode.ts:67
↓ 2 callers
Function
useDebouncedColumnFilter
({ columnFilters, columnId, onColumnFiltersChange, delay = 500, }: UseDebouncedColumnFilterOptions)
web/src/components/data-table/hooks/use-debounced-column-filter.ts:31
↓ 2 callers
Function
useDialogs
()
web/src/hooks/use-dialog.ts:131
↓ 2 callers
Function
useDirection
()
web/src/context/direction-provider.tsx:74
↓ 2 callers
Function
useFilters
(models: PricingModel[], modelOrder?: ModelOrder)
web/src/features/pricing/hooks/use-filters.ts:56
↓ 2 callers
Function
useIndependentAuthSessionRedis
(t *testing.T)
service/auth_session_test.go:65
↓ 2 callers
Function
useIsSidebarModuleVisible
(url: string)
web/src/hooks/use-sidebar-config.ts:322
↓ 2 callers
Function
useLogExportDatabases
(t *testing.T, mainDB *gorm.DB, logDB *gorm.DB, mainType common.DatabaseType, logType common.DatabaseType)
controller/log_export_test.go:69
↓ 2 callers
Function
useModelPricingIssues
()
web/src/features/system-settings/models/pricing-issues.ts:64
↓ 2 callers
Function
useNodeSync
(topics?: string[])
web/src/features/system-info/hooks/use-node-sync.ts:36
↓ 2 callers
Function
useNotifications
()
web/src/hooks/use-notifications.ts:66
↓ 2 callers
Function
useOAuthLogin
( status: SystemStatus | null, redirectTo?: string )
web/src/features/auth/hooks/use-oauth-login.ts:41
↓ 2 callers
Function
useOptionalPromptInputController
()
web/src/components/ai-elements/prompt-input.tsx:141
↓ 2 callers
Function
usePlan
()
web/src/components/ai-elements/plan.tsx:50
↓ 2 callers
Function
usePortalContainer
()
web/src/components/ui/portal-container.ts:31
↓ 2 callers
Function
usePricingColumns
( options: PricingColumnsOptions = {} )
web/src/features/pricing/components/pricing-columns.tsx:43
↓ 2 callers
Function
useProfile
()
web/src/features/profile/hooks/use-profile.ts:36
↓ 2 callers
Function
useRedirectPanelPlacement
( anchorRef: RefObject<HTMLElement | null>, enabled: boolean, sheetSide: 'left' | 'right' )
web/src/features/channels/hooks/use-redirect-panel-placement.ts:38
↓ 2 callers
Function
useSaveModelPricing
()
web/src/features/model-pricing/api.ts:169
↓ 2 callers
Function
useSavePolicy
()
web/src/features/system-settings/request-policies/use-save-policy.ts:9
↓ 2 callers
Function
useSidebarData
(badges: SidebarBadges = {})
web/src/hooks/use-sidebar-data.ts:52
↓ 2 callers
Function
useSyncPriceSelection
()
web/src/features/system-settings/models/upstream-ratio-sync-helpers.ts:274
↓ 2 callers
Function
useSystemTaskMatrixDB
useSystemTaskMatrixDB points DB at a fresh system_tasks table on dialect, skipping MySQL and PostgreSQL unless TEST_MYSQL_DSN / TEST_POSTGRES_DSN are
model/system_task_test.go:22
↓ 2 callers
Function
useThemeColor
(cssVariable: string)
web/src/lib/theme-color.ts:51
↓ 2 callers
Method
useToken
useToken exchanges a static key line for the token the hooks get, when the plugin exports exchangeKey. The plugin's error keeps its status, so the cha
relay/channel/providerplugin/adaptor.go:605
↓ 2 callers
Function
useUserDisplay
(user: AuthUser | null | undefined)
web/src/hooks/use-user-display.ts:29
↓ 2 callers
Function
useUsersColumns
()
web/src/features/users/components/users-columns.tsx:49
↓ 2 callers
Function
userContent
(parts ...string)
plugins/request_plugins_test.go:1140
↓ 2 callers
Function
userNode
(row: FlowQuotaDataItem)
web/src/features/dashboard/lib/flow.ts:174
↓ 2 callers
Function
userOverridePolicies
userOverridePolicies returns the override entries that differ from the managed role baseline; entries matching the baseline are omitted.
service/authz/override.go:138
↓ 2 callers
Function
usesChatQuantities
(variables: ReadonlySet<string>)
web/src/features/pricing/lib/plugin-pricing.ts:71
↓ 2 callers
Function
usesRequestProbe
(node ast.Node)
pkg/billingexpr/compile.go:98
↓ 2 callers
Function
usesTaskModelPricing
( data: ModelRatioData | null | undefined, schema: BillingUsageSchema | undefined, variants: ModelPricin
web/src/features/system-settings/models/model-pricing-core.ts:86
↓ 2 callers
Function
utf16Byte
utf16Byte is the byte offset in text of a UTF-16 offset. Inside a surrogate pair it rounds down, or up when up is set.
relay/requestplugin/reply.go:560
↓ 2 callers
Function
utf16Text
(data []byte)
relay/requestplugin/pdf.go:500
↓ 2 callers
Function
validateAdminStep
()
web/src/features/setup/setup-wizard.tsx:211
↓ 2 callers
Function
validateCustomOAuthProvider
validateCustomOAuthProvider validates a custom OAuth provider configuration
model/custom_oauth_provider.go:170
↓ 2 callers
Function
validateEmailBindingAccountWithTx
(tx *gorm.DB, identity AuthSessionIdentity, state *EmailBindingState)
model/email_binding.go:188
↓ 2 callers
Function
validateExpiredTime
(expired int64)
controller/redemption.go:206
↓ 2 callers
Function
validateHailuoCombo
(model, duration, resolution, hasImage)
plugins/tasks/hailuo/plugin.js:499
↓ 2 callers
Function
validateLikePattern
(input string)
model/token.go:138
↓ 2 callers
Function
validateLocalizedText
(text LocalizedText, name string, maxRunes int)
pluginkit/meta.go:2156
← previous
next →
4,901–5,000 of 15,592, ranked by callers