Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QuantumNous/new-api
/ functions
Functions
15,409 in github.com/QuantumNous/new-api
⨍
Functions
15,409
◇
Types & classes
2,241
↓ 2 callers
Function
pluginUsageSchema
( model: PricingModel | undefined, pluginKey: string | undefined )
web/src/features/pricing/lib/plugin-pricing.ts:119
↓ 2 callers
Function
pngUp
pngUp encodes data as PNG Up rows of columns bytes, the last padded with zeros.
relay/requestplugin/pdf_test.go:132
↓ 2 callers
Function
policyEffect
(policy []string)
service/authz/resolver.go:78
↓ 2 callers
Function
popTaskArtifactAccessQuery
(request *http.Request)
middleware/task_artifact_access.go:134
↓ 2 callers
Function
positiveUserSessionEnv
(name string, fallback int)
common/init.go:177
↓ 2 callers
Function
postConsumeQuotaWithResult
(relayInfo *relaycommon.RelayInfo, quota int, preConsumedQuota int, sendEmail bool)
service/quota.go:440
↓ 2 callers
Function
postTelegramBindResult
( callback: TelegramBindCallback, opener: Pick<Window, 'closed' | 'postMessage'> | null, targetOrigin: s
web/src/features/auth/lib/oauth-bind-window.ts:79
↓ 2 callers
Method
prefix
()
pkg/cachex/namespace.go:8
↓ 2 callers
Method
prepare
(candidate, current *jsplugin.RoutingGeneration)
router/plugin-router.go:160
↓ 2 callers
Method
prepareForInsert
(tx *gorm.DB)
model/user.go:624
↓ 2 callers
Method
prepareKey
prepareKey binds the plugin and its route, refreshes a credential that expires soon and exchanges a static key for a token when the plugin exports exc
relay/channel/providerplugin/adaptor.go:174
↓ 2 callers
Function
previewModelPricing
(request: { model_name: string pricing: PricingValues })
web/src/features/model-pricing/api.ts:106
↓ 2 callers
Function
pricingAdjustmentRows
( details: LegacyBillingDetails | undefined, t: (key: string) => string )
web/src/features/system-settings/models/model-pricing-core.ts:424
↓ 2 callers
Function
pricingEndpointTypesFromPricing
(pricings []Pricing)
model/pricing_endpoint_test.go:73
↓ 2 callers
Function
pricingUsesRelayRoutes
pricingUsesRelayRoutes reports a channel type whose endpoints come from its relay routes: Advanced Custom settings, or a task plugin's meta.relay.
model/pricing.go:145
↓ 2 callers
Function
pricingValuesByModel
( options: PricingOptions )
web/src/features/model-pricing/pricing.ts:332
↓ 2 callers
Function
processFormMap
(formMap map[string]any, v any)
common/gin.go:406
↓ 2 callers
Function
processUserChartData
( data: QuotaDataItem[], timeGranularity: TimeGranularity = 'day', t?: TFunction, limit = 10 )
web/src/features/dashboard/lib/charts.ts:709
↓ 2 callers
Function
productForReqKey
(reqKey)
plugins/tasks/jimeng/plugin.js:194
↓ 2 callers
Function
promptField
(source, required)
plugins/tasks/xai/plugin.js:173
↓ 2 callers
Function
proofHeaders
(proofToken?: string)
web/src/features/auth/passkey/api.ts:28
↓ 2 callers
Method
protectedHeader
protectedHeader reports the headers a header.patch effect must not touch besides requestpatch.IsProtectedHeader: the route auth header and the credent
relay/channel/providerplugin/adaptor.go:672
↓ 2 callers
Function
protocolPluginSource
(key, models, protocols, exports string)
pkg/jsplugin/protocol_supports_test.go:231
↓ 2 callers
Function
providerTestEndpoint
providerTestEndpoint returns the endpoint a task plugin channel test uses for model instead of requestPath, which meta's relay routes do not serve. ok
controller/channel-test.go:72
↓ 2 callers
Function
ptrValue
(value T)
service/convert_test.go:112
↓ 2 callers
Function
publishAuthSessionEvent
( kind: AuthSessionSyncEvent['kind'], sid: string )
web/src/lib/auth-session-sync.ts:53
↓ 2 callers
Function
publishCreatedUserSession
(session *UserSession, cacheDeadline time.Time)
model/user_session.go:166
↓ 2 callers
Function
publishRows
(nextRows: TaskMatrixRow[])
web/src/features/system-settings/models/task-usage-pricing-editor.tsx:346
↓ 2 callers
Function
push
(text, path)
plugins/tasks/content-moderation/plugin.js:168
↓ 2 callers
Function
pushText
(fields, path, value)
plugins/tasks/request-redact/plugin.js:226
↓ 2 callers
Method
query
()
model/system_task.go:202
↓ 2 callers
Method
queryCredentials
queryCredentials returns what the parse hooks of a poll response receive: the key line the poll sent, which on a channel with credentials is the submi
relay/channel/task/jsplugin/adaptor.go:1511
↓ 2 callers
Function
queryMember
(object map[string]any, name, subject string)
pkg/jsplugin/provider.go:1807
↓ 2 callers
Function
queueSearchValue
(value: string)
web/src/components/data-table/toolbar/toolbar.tsx:224
↓ 2 callers
Function
quotaNotifyContent
quotaNotifyContent renders a low-quota notice in the user's saved language. Bark and Gotify get plain text; email and webhook get HTML with the top-up
service/quota.go:556
↓ 2 callers
Function
quotaUnitsToDisplayAmount
( units: number, quotaPerUnit: number, meta: ReturnType<typeof getCurrencyDisplay>['meta'] )
web/src/lib/format.ts:127
↓ 2 callers
Function
quotedJoin
(items []string, sep string)
pkg/jsplugin/registry.go:2618
↓ 2 callers
Function
qwenImage3
(ctx)
plugins/tasks/alibaba/plugin.js:482
↓ 2 callers
Function
randomIdentifier
()
web/src/lib/auth-session-sync.ts:30
↓ 2 callers
Function
rankingBucketLabel
(bucket int64, config rankingPeriodConfig)
service/rankings.go:528
↓ 2 callers
Function
rankingBucketTs
(bucket int64)
service/rankings.go:524
↓ 2 callers
Function
rankingGrowthPct
(current int64, previous int64)
service/rankings.go:563
↓ 2 callers
Function
ratioToPrice
(ratio?: string, denominator?: string)
web/src/features/system-settings/models/model-pricing-snapshots.ts:79
↓ 2 callers
Function
readCgroupStatValue
readCgroupStatValue 从 "key value" 逐行格式的 cgroup 统计文件(cpu.stat、memory.stat)中读取一项。
common/container_usage.go:160
↓ 2 callers
Method
readContent
readContent reads the text of contents, a content stream or an array of them, with the fonts and forms of resources.
relay/requestplugin/pdf.go:156
↓ 2 callers
Function
readDocument
readDocument reads a PDF or DOCX file: at most two at once in the process, each for at most documentTimeout.
relay/requestplugin/attachments.go:244
↓ 2 callers
Function
readFrontMatter
( text: string, location: PluginDocumentLocation, options: { required: boolean; keys: readonly string[]
web/src/features/task-plugins/lib/plugin-document.ts:238
↓ 2 callers
Function
readFrontMatterTranslations
( frontMatter: PluginDocumentFrontMatter, location: PluginDocumentLocation & { locale: string }, baseNam
web/src/features/task-plugins/lib/plugin-document.ts:311
↓ 2 callers
Function
readH2TestRequest
(framer *http2.Framer)
relay/channel/api_request_getbody_test.go:278
↓ 2 callers
Function
readLimited
(resp *http.Response, limit int64)
relay/channel/providerplugin/management.go:299
↓ 2 callers
Function
readPluginLoginFailure
( data: unknown, flow: string | null )
web/src/features/channels/lib/plugin-login.ts:208
↓ 2 callers
Function
readPluginLoginMessage
( data: unknown, channelId: number )
web/src/features/channels/lib/plugin-login.ts:190
↓ 2 callers
Function
readPluginLoginRedirect
(url: string)
web/src/features/channels/lib/plugin-login.ts:246
↓ 2 callers
Function
readPluginSourceParts
( source: string )
web/src/features/task-plugins/lib/plugin-meta-preview.ts:423
↓ 2 callers
Function
readStageBody
readStageBody reads the stored client body. A read error is cached, so parsing the request reports it next; a body the hooks cannot read is left to pa
relay/requestplugin/relay.go:231
↓ 2 callers
Function
readStaticString
Decode JavaScript string tokens without evaluating code, including JS-only escapes.
web/src/features/task-plugins/lib/plugin-meta-preview.ts:181
↓ 2 callers
Function
readStoredValue
(baseKey: string)
web/src/features/playground/lib/storage/storage.ts:60
↓ 2 callers
Method
readStream
readStream reads at most limit decompressed bytes of a stream; false when the library cannot decode it, or when its decoding would pass the filter or
relay/requestplugin/pdf.go:188
↓ 2 callers
Function
readTaskExtendPluginKeys
( channelType: number, setting: | Pick<ChannelSettings, 'task_plugin_key' | 'task_extend_plugin_keys'>
web/src/features/channels/lib/channel-plugin-extensions.ts:50
↓ 2 callers
Function
readText
readText reads a text file: UTF-8, or UTF-16 with a byte order mark. It stops at maxChars UTF-16 code units. A NUL character makes the file unreadable
relay/requestplugin/extract.go:68
↓ 2 callers
Function
readThemePreference
( key: string, allowed: ReadonlySet<T>, fallback: T )
web/src/lib/theme-storage.ts:28
↓ 2 callers
Function
readTimeTokenPricing
( source: string, now?: Date )
web/src/features/pricing/lib/billing-expression/display.ts:296
↓ 2 callers
Function
realtimeError
realtimeError is a Realtime error event for a client event the instances stopped, or for a response they stopped (eventID "").
relay/requestplugin/socket.go:384
↓ 2 callers
Method
realtimeFields
realtimeFields reads the text of a Realtime server event: the text of an answer, and the transcript of its audio, which is read only.
relay/requestplugin/reply.go:1256
↓ 2 callers
Function
realtimeText
realtimeText is the text member of a Realtime content part: its text, or the transcript of its audio, which is read only.
relay/requestplugin/reply.go:1303
↓ 2 callers
Method
reasoningDelta
(delta string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:283
↓ 2 callers
Function
reasoningEffortFromRequest
(request dto.Request)
relay/common/relay_info.go:568
↓ 2 callers
Method
reasoningOutput
(status string)
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:880
↓ 2 callers
Function
receiveChannelCloseEvents
(ctx context.Context, ch <-chan *redis.Message, origin string)
pkg/wsmanager/wsmanager.go:156
↓ 2 callers
Function
recentMetrics
( current: InferenceStatus, previous?: InferenceStatus )
web/src/features/channels/lib/inference-status.ts:92
↓ 2 callers
Function
recentSuccessSeries
(buckets map[int64]counters)
pkg/perf_metrics/metrics.go:379
↓ 2 callers
Function
recordClaudeServerToolUse
recordClaudeServerToolUse bills the server tool requests Anthropic reports in usage.server_tool_use. Searches and fetches use the channel's own keys w
relay/channel/claude/relay-claude.go:259
↓ 2 callers
Function
recordLegacyGitHubBindingAudit
recordLegacyGitHubBindingAudit records the outcome of a legacy GitHub binding rewrite as an account binding event. No session exists yet on the login
controller/oauth.go:585
↓ 2 callers
Method
recordOperation
(mode, path, from, to string, value any)
relay/common/override.go:387
↓ 2 callers
Function
recordPasskeyDomainAudit
(c *gin.Context, change *model.PasskeyDomainChange, confirmed bool, err error)
controller/audit.go:78
↓ 2 callers
Function
recordReasoningDiagnostics
recordReasoningDiagnostics attaches best-effort reasoning resolutions made while merging request fields with model-name effort tails to the request lo
relay/channel/openai/adaptor.go:834
↓ 2 callers
Function
recordRedisRequest
记录Redis请求
middleware/model-rate-limit.go:69
↓ 2 callers
Function
recorded
recorded reports an entry that changed the request or the answer, found something or stopped it, or looked at its attachments; the public record leave
relay/requestplugin/record.go:34
↓ 2 callers
Function
redact
(rules, text)
plugins/tasks/request-redact/plugin.js:394
↓ 2 callers
Function
redisBucketKey
(key bucketKey)
pkg/perf_metrics/metrics.go:616
↓ 2 callers
Function
redisRateLimitHandler
Redis限流处理器
middleware/model-rate-limit.go:82
↓ 2 callers
Function
redisUserRateLimitKey
(mark string, userID int)
middleware/rate-limit.go:49
↓ 2 callers
Function
reencodeMedia
reencodeMedia decodes an inline image and encodes it again as a media.reencode effect asks. It returns the json.patch operations that replace the medi
relay/requestplugin/media.go:173
↓ 2 callers
Function
registerCustomLocked
registerCustomLocked registers a custom provider; the caller holds mu.
oauth/registry.go:38
↓ 2 callers
Function
registerFormPlugin
(t *testing.T)
relay/requestplugin/requestplugin_test.go:1670
↓ 2 callers
Function
registerSourcePlugin
(t *testing.T, key, source string)
service/provider_plugin_token_test.go:79
↓ 2 callers
Function
registeredSystemTaskHandlers
()
service/system_task.go:66
↓ 2 callers
Function
relaysSubmitEvents
relaysSubmitEvents reports whether the submission came through a native route, whose client receives an SSE reply event by event.
relay/channel/task/jsplugin/adaptor.go:650
↓ 2 callers
Method
release
()
pkg/jsplugin/fetch.go:83
↓ 2 callers
Method
releaseOut
releaseOut writes the released text that no event carried in delta events of its own.
relay/requestplugin/reply.go:1420
↓ 2 callers
Method
released
released is a Realtime event with the text of each output the check read set to what the client got.
relay/requestplugin/socket.go:636
↓ 2 callers
Function
remove
(root *node, tokens []string)
pkg/requestpatch/patch.go:773
↓ 2 callers
Function
removeCookie
(name: string)
web/src/lib/cookies.ts:57
↓ 2 callers
Function
removeFunctionCallIDs
(request *dto.GeminiChatRequest)
relay/channel/vertex/adaptor.go:67
↓ 2 callers
Function
removeTag
(tagToRemove: string)
web/src/components/tag-input.tsx:55
↓ 2 callers
Function
renderCellContent
( cell: Cell<TData, unknown> )
web/src/components/data-table/layout/card-cell-utils.ts:39
↓ 2 callers
Function
renderInstances
(language?: ReturnType<typeof createInstance>)
web/src/features/request-processing/__tests__/request-processing.test.tsx:194
↓ 2 callers
Function
renderMath
(source: string, displayMode: boolean)
web/src/components/ui/markdown.tsx:185
↓ 2 callers
Function
renderTableBody
( props: DataTableViewProps<TData>, rows: Row<TData>[], colSpan: number, getColumnClassName: DataTable
web/src/components/data-table/core/data-table-view.tsx:245
↓ 2 callers
Function
renderTaskPluginProtocolFinalResponse
( ctx context.Context, pinned pluginruntime.PinnedEndpoint, protocolRequest pluginruntime.ProtocolRequestCo
controller/plugin_protocol.go:852
← previous
next →
4,501–4,600 of 15,409, ranked by callers