MCPcopy Create free account

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

Functions15,409 in github.com/QuantumNous/new-api

↓ 2 callersFunctiontaskAdjustFunding
taskAdjustFunding 调整任务的资金来源(钱包或订阅),delta > 0 表示扣费,delta < 0 表示退还。
service/task_billing.go:120
↓ 2 callersFunctiontaskAdjustTokenQuota
taskAdjustTokenQuota 调整任务的令牌额度,delta > 0 表示扣费,delta < 0 表示退还。 需要通过 resolveTokenKey 运行时获取 key(不从 PrivateData 中读取)。
service/task_billing.go:132
↓ 2 callersFunctiontaskArtifactAccessMessage
(taskID, artifactKey string)
service/task_artifact_access.go:26
↓ 2 callersFunctiontaskArtifactContext
(task *model.Task)
relay/channel/task/jsplugin/adaptor.go:1424
↓ 2 callersFunctiontaskFailReasonIsLegacyResultURL
(value string)
controller/task.go:517
↓ 2 callersFunctiontaskResult
taskResult reads the result of a task for its report: the http and https URLs, then the other strings as texts with their dotted paths. Data URLs and
relay/requestplugin/task_report.go:204
↓ 2 callersFunctiontaskTierConditions
( tier: ParsedTaskTier, schema: BillingUsageSchema | undefined, language: string, t: (key: string) =>
web/src/features/pricing/lib/task-price-display.ts:104
↓ 2 callersMethodterminalChunk
(model string)
relaykit/relayconvert/internal/gemini_chat/to_oai_chat_resp.go:701
↓ 2 callersFunctionterminalTestGeminiChunkWithoutUsage
(text string, finishReason string)
relaykit/relayconvert/terminal_stream_test.go:354
↓ 2 callersFunctionterminalTestPtr
(value T)
relaykit/relayconvert/terminal_stream_test.go:443
↓ 2 callersFunctiontestChannel
(ctx context.Context, channel *model.Channel, testUserID int, testModel string, endpointType string, isStream
controller/channel-test.go:102
↓ 2 callersFunctiontestDOCX
testDOCX is a DOCX file whose document holds paragraphs.
relay/requestplugin/attachments_test.go:116
↓ 2 callersFunctiontestPNG
(t *testing.T, width, height int)
relay/requestplugin/attachments_test.go:139
↓ 2 callersFunctiontestPrefillGroupMigrationNonPostgreSQL
(t *testing.T, db *gorm.DB)
model/prefill_group_migration_test.go:20
↓ 2 callersFunctiontestPreviousRefreshHashMigration
(t *testing.T, db *gorm.DB, recorder *migrationSQLRecorder, dialect string)
model/user_session_migration_test.go:82
↓ 2 callersFunctiontestTokenKeyMigrationNonPostgreSQL
(t *testing.T, db *gorm.DB)
model/token_migration_test.go:43
↓ 2 callersFunctiontextAvatarClass
(colorSeed: string)
web/src/features/task-plugins/lib/plugin-icon.ts:101
↓ 2 callersMethodtextDelta
(delta string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:169
↓ 2 callersFunctiontextInputs
(config, texts, single, maxRequests)
plugins/tasks/content-moderation/plugin.js:283
↓ 2 callersFunctiontextRegistryResponsesResponse
()
relaykit/relayconvert/response_registry_test.go:674
↓ 2 callersFunctiontimeInBillingZone
( now: Date, zone: string )
web/src/features/pricing/lib/billing-expression/runtime.ts:116
↓ 2 callersFunctiontoCsvLine
(cells: string[])
web/src/features/usage-logs/lib/export.ts:101
↓ 2 callersFunctiontoFormValues
(config: HeaderNavModulesConfig)
web/src/features/system-settings/maintenance/header-navigation-section.tsx:69
↓ 2 callersFunctiontoInt
(value: unknown, fallback: number)
web/src/features/models/components/dialogs/extend-deployment-dialog.tsx:35
↓ 2 callersFunctiontoOllamaResponseFormat
(responseFormat *dto.ResponseFormat)
relay/channel/ollama/relay-ollama.go:21
↓ 2 callersFunctiontoUnix
(ts string)
relay/channel/ollama/stream.go:127
↓ 2 callersFunctiontoUptimePct
(value: number)
web/src/features/pricing/components/model-details-performance.tsx:87
↓ 2 callersFunctiontoValueText
(value: unknown)
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:458
↓ 2 callersFunctiontoWebSocketURL
toWebSocketURL maps an http(s) endpoint to ws(s). Realtime adaptors already return ws(s) URLs, which pass through unchanged.
relay/channel/api_request.go:517
↓ 2 callersFunctiontokenBatchAuditParams
(c *gin.Context, ids []int)
controller/audit.go:196
↓ 2 callersFunctiontokenize
(input: string)
web/src/features/home/components/hero-terminal-demo.tsx:459
↓ 2 callersMethodtokens
()
controller/provider_plugin_test.go:68
↓ 2 callersMethodtoolItem
(event *dto.ResponsesStreamResponse)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:307
↓ 2 callersMethodtoolOutput
(tool *chatToResponsesStreamTool, status string)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:894
↓ 2 callersFunctiontopBar
()
web/src/features/system-settings/models/__tests__/price-changes.test.tsx:129
↓ 2 callersFunctiontopUpQueryCutoff
topUpQueryCutoff 返回允许查询的最早 create_time(秒级 Unix 时间戳)。
model/topup.go:296
↓ 2 callersFunctiontopUpQuotaMaxCurrent
(creditedQuota int)
model/topup.go:61
↓ 2 callersMethodtouch
touch restarts the idle timer on upstream data.
relay/channel/providerplugin/stream.go:170
↓ 2 callersFunctiontransformApiKeyToFormDefaults
( apiKey: ApiKey, availableAutoGroups: string[] = [], maxAutoGroups = 5 )
web/src/features/keys/lib/api-key-form.ts:169
↓ 2 callersFunctiontransformFormDataToPayload
( data: ApiKeyFormValues )
web/src/features/keys/lib/api-key-form.ts:141
↓ 2 callersFunctiontransformUserToFormDefaults
(user: User)
web/src/features/users/lib/user-form.ts:115
↓ 2 callersMethodtransportFor
(proxyURL *url.URL)
service/protected_fetch_client.go:124
↓ 2 callersFunctiontrimMessages
(messages: Message[])
web/src/features/playground/lib/storage/storage.ts:106
↓ 2 callersFunctiontruncateAuthMetadata
(value string, max int)
service/auth_session.go:455
↓ 2 callersFunctiontryParseOperations
(paramOverride map[string]any)
relay/common/override.go:580
↓ 2 callersFunctiontryParseRequestConditions
( conditionStr: string )
web/src/features/pricing/lib/billing-expr.ts:536
↓ 2 callersFunctionuid
()
web/src/features/system-settings/models/group-special-usable-editor.tsx:67
↓ 2 callersFunctionunmarshalBodyReusable
(c *gin.Context, v any, noCopy bool)
common/gin.go:130
↓ 2 callersMethodunobserve
()
web/src/test-setup.ts:92
↓ 2 callersFunctionunrecognizedPollDetail
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 callersFunctionupdateAdminPermissionsForUserInTx
(c *gin.Context, tx *gorm.DB, userID int, userRole int, permissions map[string]map[string]bool)
controller/user.go:1070
↓ 2 callersFunctionupdateAuth
( field: Exclude<keyof NonNullable<AdvancedCustomRoute['auth']>, 'type'>, value: string )
web/src/features/channels/components/dialogs/advanced-custom-editor-dialog.tsx:1016
↓ 2 callersFunctionupdateBalanceInRun
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 callersFunctionupdateBatchTasks
(ctx context.Context, adaptor BatchTaskPollingAdaptor, channelId int, taskIds []string, taskM map[string]*mode
service/task_polling.go:271
↓ 2 callersFunctionupdateChannelBalance
( id: number )
web/src/features/channels/api.ts:342
↓ 2 callersFunctionupdateChannelStatus
( id: number, status: number )
web/src/features/channels/api.ts:260
↓ 2 callersFunctionupdateChannelUpstreamModelSettings
(channel *model.Channel, settings dto.ChannelOtherSettings, updateModels bool)
controller/channel_upstream_update.go:583
↓ 2 callersFunctionupdateChannelUsedQuota
(id int, quota int)
model/channel.go:1080
↓ 2 callersFunctionupdateConfigFromMap
辅助函数:从map更新配置对象
setting/config/config.go:165
↓ 2 callersFunctionupdateLastAssistantMessage
( messages: Message[], updater: (message: Message) => Message )
web/src/features/playground/lib/message/message-update-utils.ts:51
↓ 2 callersFunctionupdatePluginChannelBalance
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 callersFunctionupdatePricing
()
model/pricing.go:217
↓ 2 callersFunctionupsertPasskeyCredentialWithAuthVersion
(credential *PasskeyCredential, identity *AuthSessionIdentity)
model/passkey.go:232
↓ 2 callersFunctionupstreamBody
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 callersFunctionupstreamErrorResponse
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 callersFunctionurlFor
(ctx, action)
plugins/tasks/kling/plugin.js:177
↓ 2 callersFunctionusageBillingPathForLog
(isLocalCountTokens bool, usage *dto.Usage)
service/billing_usage.go:26
↓ 2 callersFunctionusageCompletionTokens
(usage *dto.Usage)
service/channel_affinity.go:960
↓ 2 callersFunctionusageFromBillingUsage
(usage *dto.Usage)
service/billing_usage.go:63
↓ 2 callersFunctionusageFromResponsesUsage
(src *dto.Usage, createBillingSnapshot bool)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_resp.go:195
↓ 2 callersFunctionusagePromptTokens
(usage *dto.Usage)
service/channel_affinity.go:950
↓ 2 callersMethodusageRatios
(ctx context.Context, models []string, hook string, args ...any)
relay/channel/task/jsplugin/adaptor.go:1934
↓ 2 callersFunctionuseActiveChatKey
(enabled: boolean)
web/src/features/chat/hooks/use-active-chat-key.ts:53
↓ 2 callersFunctionuseApiKeysColumns
(now: number)
web/src/features/keys/components/api-keys-columns.tsx:70
↓ 2 callersFunctionuseChannelBalanceQueryable
( channel: Pick<Channel, 'type' | 'setting'> )
web/src/features/channels/hooks/use-task-plugin-option.ts:85
↓ 2 callersFunctionuseChannelKeyDisclosure
( open: boolean, channelId: number | null )
web/src/features/channels/hooks/use-channel-key-disclosure.ts:30
↓ 2 callersFunctionuseChannelModelFetchable
( channel: Pick<Channel, 'type' | 'setting'> )
web/src/features/channels/hooks/use-task-plugin-option.ts:65
↓ 2 callersFunctionuseChannelsColumns
( options: { enableSelection?: boolean } = {} )
web/src/features/channels/components/channels-columns.tsx:672
↓ 2 callersFunctionuseChart
()
web/src/components/ui/chart.tsx:48
↓ 2 callersFunctionuseComboboxAnchor
()
web/src/components/ui/combobox.tsx:471
↓ 2 callersFunctionuseControllableState
({ prop, defaultProp, onChange, }: { prop?: T | undefined defaultProp?: T | undefined onChange?: (
web/src/lib/use-controllable-state.ts:46
↓ 2 callersMethoduseCredentialLine
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 callersFunctionuseDataTableViewMode
( options: UseDataTableViewModeOptions = {} )
web/src/components/data-table/hooks/use-data-table-view-mode.ts:67
↓ 2 callersFunctionuseDebouncedColumnFilter
({ columnFilters, columnId, onColumnFiltersChange, delay = 500, }: UseDebouncedColumnFilterOptions)
web/src/components/data-table/hooks/use-debounced-column-filter.ts:31
↓ 2 callersFunctionuseDialogs
()
web/src/hooks/use-dialog.ts:131
↓ 2 callersFunctionuseDirection
()
web/src/context/direction-provider.tsx:74
↓ 2 callersFunctionuseIndependentAuthSessionRedis
(t *testing.T)
service/auth_session_test.go:65
↓ 2 callersFunctionuseIsSidebarModuleVisible
(url: string)
web/src/hooks/use-sidebar-config.ts:322
↓ 2 callersFunctionuseLogExportDatabases
(t *testing.T, mainDB *gorm.DB, logDB *gorm.DB, mainType common.DatabaseType, logType common.DatabaseType)
controller/log_export_test.go:69
↓ 2 callersFunctionuseModelPricingIssues
()
web/src/features/system-settings/models/pricing-issues.ts:64
↓ 2 callersFunctionuseNodeSync
(topics?: string[])
web/src/features/system-info/hooks/use-node-sync.ts:36
↓ 2 callersFunctionuseNotifications
()
web/src/hooks/use-notifications.ts:66
↓ 2 callersFunctionuseOAuthLogin
( status: SystemStatus | null, redirectTo?: string )
web/src/features/auth/hooks/use-oauth-login.ts:41
↓ 2 callersFunctionuseOptionalPromptInputController
()
web/src/components/ai-elements/prompt-input.tsx:141
↓ 2 callersFunctionusePlan
()
web/src/components/ai-elements/plan.tsx:50
↓ 2 callersFunctionusePortalContainer
()
web/src/components/ui/portal-container.ts:31
↓ 2 callersFunctionusePricingColumns
( options: PricingColumnsOptions = {} )
web/src/features/pricing/components/pricing-columns.tsx:43
↓ 2 callersFunctionuseProfile
()
web/src/features/profile/hooks/use-profile.ts:36
↓ 2 callersFunctionuseRedirectPanelPlacement
( anchorRef: RefObject<HTMLElement | null>, enabled: boolean, sheetSide: 'left' | 'right' )
web/src/features/channels/hooks/use-redirect-panel-placement.ts:38
↓ 2 callersFunctionuseSaveModelPricing
()
web/src/features/model-pricing/api.ts:169
← previousnext →4,801–4,900 of 15,409, ranked by callers