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
setProtocolRequestBackground
(c *gin.Context, background bool)
controller/plugin_protocol_test.go:1556
↓ 2 callers
Method
setTarget
(target *websocket.Conn)
relay/responses_websocket.go:846
↓ 2 callers
Function
setTaskImageCount
setTaskImageCount publishes the billed image quantity of an image task as other.image_count, the same field the HTTP image relay writes, so the log de
service/task_billing.go:194
↓ 2 callers
Function
setTaskMediaResponseSecurityHeaders
(header http.Header)
controller/video_proxy.go:656
↓ 2 callers
Function
setTokenAutoGroups
(c *gin.Context, token *model.Token, groups []string)
controller/token.go:92
↓ 2 callers
Function
setVariant
(newVariant: Variant)
web/src/context/layout-provider.tsx:73
↓ 2 callers
Function
settleTestQuota
(info *relaycommon.RelayInfo, priceData hosttypes.PriceData, usage *dto.Usage)
controller/channel-test.go:584
↓ 2 callers
Function
setupEpayCallbackTest
setupEpayCallbackTest configures an Epay gateway and leaves model.DB nil: rejected callbacks and valid non-success events must never reach settlement,
controller/payment_webhook_availability_test.go:215
↓ 2 callers
Function
setupLoginAtAuthVersion
(user *model.User, expectedAuthVersion int64, c *gin.Context)
controller/user.go:164
↓ 2 callers
Function
shouldAuditParamPath
(path string)
relay/common/override.go:416
↓ 2 callers
Function
shouldLoadTaskArtifacts
( log: TaskLog, dialogOpen: boolean )
web/src/features/usage-logs/lib/task-artifacts.ts:204
↓ 2 callers
Function
shouldMatchStatusCodeRanges
(ranges []StatusCodeRange, code int)
setting/operation_setting/status_code_ranges.go:102
↓ 2 callers
Function
shouldSendUpstreamModelUpdateNotification
(now int64, changedChannels int, failedChannels int)
controller/channel_upstream_update.go:658
↓ 2 callers
Function
shouldShowBillingSource
( input: BillingSourceVisibilityInput )
web/src/features/usage-logs/lib/billing-source.ts:37
↓ 2 callers
Function
shouldSkipClaudeMessageDeltaUsagePatch
(info *relaycommon.RelayInfo)
relay/channel/claude/relay-claude.go:71
↓ 2 callers
Function
shouldUseDiskCache
shouldUseDiskCache 判断是否应该使用磁盘缓存
service/file_service.go:239
↓ 2 callers
Function
sizeDimensions
(size)
plugins/tasks/kling/plugin.js:186
↓ 2 callers
Function
sizeParts
(size)
plugins/tasks/google/plugin.js:118
↓ 2 callers
Function
sizeParts
(size)
plugins/tasks/vertex-ai/plugin.js:296
↓ 2 callers
Function
sizePixels
(size)
plugins/tasks/alibaba/plugin.js:502
↓ 2 callers
Function
sortModels
( models: PricingModel[], sortBy: string, modelOrder?: ModelOrder )
web/src/features/pricing/lib/filters.ts:215
↓ 2 callers
Function
sortedRankingBuckets
(bucketSet map[int64]struct{})
service/rankings.go:515
↓ 2 callers
Function
sourceMenu
()
web/src/features/task-plugins/__tests__/marketplace-panel.test.tsx:120
↓ 2 callers
Function
splitExpressionAtTopLevel
( source: string, operator: string )
web/src/features/pricing/lib/billing-expression/structure.ts:20
↓ 2 callers
Function
splitHeaderListValue
(raw string)
relay/common/override.go:1391
↓ 2 callers
Function
splitShebang
(text)
web/scripts/add-copyright.mjs:139
↓ 2 callers
Function
splitTopLevelMultiply
(expr: string)
web/src/features/pricing/lib/billing-expr.ts:364
↓ 2 callers
Function
splitWords
(value: string)
web/src/components/ai-elements/response-fade.ts:109
↓ 2 callers
Function
sqliteDSN
sqliteDSN turns a SQLITE_PATH value into a DSN. A bare path gets the default concurrency parameters; a value with its own query string is used as give
common/database.go:74
↓ 2 callers
Function
stale
()
web/src/features/channels/hooks/use-plugin-login.ts:75
↓ 2 callers
Method
start
()
pluginkit/engine.go:826
↓ 2 callers
Function
startOAuthBindResponseDeadline
( onTimeout: () => void, delay = 30_000, runtime: TimerRuntime = timeoutRuntime )
web/src/features/auth/lib/oauth-bind-window.ts:98
↓ 2 callers
Function
startOAuthBinding
(provider: string)
web/src/features/security/components/account-bindings.tsx:143
↓ 2 callers
Function
startPendingToolBlocks
(state *convmeta.ClaudeConvertInfo)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp.go:49
↓ 2 callers
Method
startText
()
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:426
↓ 2 callers
Function
stateMember
stateMember reads the state member of a result as JSON text, nil when the result has none.
pluginkit/provider.go:840
↓ 2 callers
Method
stateValue
stateValue is value with ctx.state, null when the plugin has set none.
pluginkit/provider.go:275
↓ 2 callers
Function
statusCodeRangesToString
(ranges []StatusCodeRange)
setting/operation_setting/status_code_ranges.go:87
↓ 2 callers
Method
stop
stop ends a response an instance stopped: the client gets an error event and, while the response runs, the upstream a response.cancel. Its other event
relay/requestplugin/socket.go:619
↓ 2 callers
Method
stopBlock
(block *responsesClaudeStreamBlock, estimatedInputTokens int)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:364
↓ 2 callers
Function
stopCloseWatcher
()
web/src/features/auth/lib/oauth-popup.ts:64
↓ 2 callers
Method
stopIdle
()
relay/channel/providerplugin/stream.go:221
↓ 2 callers
Function
stopOpenBlocks
(state *convmeta.ClaudeConvertInfo)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp.go:22
↓ 2 callers
Function
stopReasonCohere2OpenAI
(reason string)
relay/channel/cohere/relay-cohere.go:72
↓ 2 callers
Method
stopStream
stopStream ends a stopped stream: an error event in the client's format, as mid-stream errors are written, and then nothing more. Canceling the reques
relay/requestplugin/reply.go:1473
↓ 2 callers
Function
storageKeyFor
(key: string)
web/src/components/floating-window.tsx:105
↓ 2 callers
Method
store
(fullKey string, client *http.Client)
service/http_client.go:217
↓ 2 callers
Function
storeTaskRequest
(c *gin.Context, info *RelayInfo, action string, requestObj TaskSubmitReq)
relay/common/relay_utils.go:120
↓ 2 callers
Method
stream
stream reads "G obj <<...>> stream" from lexer, past the object number, and returns the dictionary and the file data its /Length, read through resolve
relay/requestplugin/pdf.go:1131
↓ 2 callers
Function
streamLogs
(tx *gorm.DB, order string, fn func(*Log) error)
model/log.go:666
↓ 2 callers
Function
streamResponseGeminiChat2OpenAI
(geminiResponse *dto.GeminiChatResponse)
relaykit/relayconvert/internal/gemini_chat/to_oai_chat_resp.go:198
↓ 2 callers
Function
streamResponseGeminiChat2OpenAI
(geminiResponse *dto.GeminiChatResponse)
relay/channel/gemini/relay-gemini.go:292
↓ 2 callers
Function
streamsInterleave
(ctx)
plugins/tasks/alibaba/plugin.js:406
↓ 2 callers
Function
stringInt
(value int)
controller/token_auto_groups_test.go:37
↓ 2 callers
Function
stringMapMember
(object map[string]any, name, subject string)
pluginkit/provider.go:1808
↓ 2 callers
Function
stringSlice
(value any)
relaykit/relayconvert/internal/toolconv/decode.go:906
↓ 2 callers
Function
stringToColor
(str: string)
web/src/lib/colors.ts:178
↓ 2 callers
Function
submitImageCount
(req)
plugins/tasks/jimeng/plugin.js:203
↓ 2 callers
Function
subscriptionPlanCacheKey
(id int)
model/subscription.go:128
↓ 2 callers
Function
subscriptionPlanCacheTTL
()
model/subscription.go:54
↓ 2 callers
Function
subscriptionPlanInfoCacheTTL
()
model/subscription.go:62
↓ 2 callers
Function
summarize
summarize returns nil when nothing was sampled, so clients can show "no data" instead of a fabricated 0% success rate.
pkg/perf_metrics/metrics.go:528
↓ 2 callers
Function
summarize
summarize computes the request stage summary of a client request body in any chat format: OpenAI messages, Responses input, Claude messages and system
relay/requestplugin/relay.go:509
↓ 2 callers
Function
supportsChannelPluginExtensions
(channelType: number)
web/src/features/channels/lib/channel-plugin-extensions.ts:39
↓ 2 callers
Method
syncRelayInfo
syncRelayInfo 将 BillingSession 的状态同步到 RelayInfo 的兼容字段上。
service/billing_session.go:365
↓ 2 callers
Function
syncToCommon
syncToCommon 将配置同步到 common 包
setting/performance_setting/config.go:50
↓ 2 callers
Function
syncTopicLabel
(topic: string, t: TFunction)
web/src/features/system-info/lib/node-sync.ts:38
↓ 2 callers
Function
systemInstanceSyncStates
systemInstanceSyncStates reads what a node's registry row says it applied. A row written before node sync existed, or unreadable, has none.
service/node_sync.go:247
↓ 2 callers
Function
systemTaskLockUntil
()
service/system_task.go:459
↓ 2 callers
Function
tableHasCompactMeta
(table: Table<TData>)
web/src/components/data-table/layout/card-cell-utils.ts:54
↓ 2 callers
Method
take
take passes the text of one stream event to the instances, and queues the event until they released it. A transcript is read only: its event goes out
relay/requestplugin/reply.go:1067
↓ 2 callers
Function
taskAdjustFunding
taskAdjustFunding 调整任务的资金来源(钱包或订阅),delta > 0 表示扣费,delta < 0 表示退还。
service/task_billing.go:120
↓ 2 callers
Function
taskAdjustTokenQuota
taskAdjustTokenQuota 调整任务的令牌额度,delta > 0 表示扣费,delta < 0 表示退还。 需要通过 resolveTokenKey 运行时获取 key(不从 PrivateData 中读取)。
service/task_billing.go:132
↓ 2 callers
Function
taskArtifactAccessMessage
(taskID, artifactKey string)
service/task_artifact_access.go:26
↓ 2 callers
Function
taskArtifactContext
(task *model.Task)
relay/channel/task/jsplugin/adaptor.go:1261
↓ 2 callers
Function
taskFailReasonIsLegacyResultURL
(value string)
controller/task.go:517
↓ 2 callers
Function
taskResult
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 callers
Function
taskTierConditions
( tier: ParsedTaskTier, schema: BillingUsageSchema | undefined, language: string, t: (key: string) =>
web/src/features/pricing/lib/task-price-display.ts:104
↓ 2 callers
Method
terminalChunk
(model string)
relaykit/relayconvert/internal/gemini_chat/to_oai_chat_resp.go:720
↓ 2 callers
Function
terminalTestGeminiChunkWithoutUsage
(text string, finishReason string)
relaykit/relayconvert/terminal_stream_test.go:354
↓ 2 callers
Function
terminalTestPtr
(value T)
relaykit/relayconvert/terminal_stream_test.go:443
↓ 2 callers
Function
testChannel
(ctx context.Context, channel *model.Channel, testUserID int, testModel string, endpointType string, isStream
controller/channel-test.go:103
↓ 2 callers
Function
testDOCX
testDOCX is a DOCX file whose document holds paragraphs.
relay/requestplugin/attachments_test.go:116
↓ 2 callers
Function
testPNG
(t *testing.T, width, height int)
relay/requestplugin/attachments_test.go:139
↓ 2 callers
Function
testPrefillGroupMigrationNonPostgreSQL
(t *testing.T, db *gorm.DB)
model/prefill_group_migration_test.go:20
↓ 2 callers
Function
testPreviousRefreshHashMigration
(t *testing.T, db *gorm.DB, recorder *migrationSQLRecorder, dialect string)
model/user_session_migration_test.go:82
↓ 2 callers
Function
testTokenKeyMigrationNonPostgreSQL
(t *testing.T, db *gorm.DB)
model/token_migration_test.go:43
↓ 2 callers
Function
textAvatarClass
(colorSeed: string)
web/src/features/task-plugins/lib/plugin-icon.ts:101
↓ 2 callers
Method
textDelta
(delta string)
relaykit/relayconvert/internal/oai_responses/to_oai_chat_stream_resp.go:169
↓ 2 callers
Function
textInputs
(config, texts, single, maxRequests)
plugins/tasks/content-moderation/plugin.js:283
↓ 2 callers
Function
textRegistryResponsesResponse
()
relaykit/relayconvert/response_registry_test.go:765
↓ 2 callers
Function
timeInBillingZone
( now: Date, zone: string )
web/src/features/pricing/lib/billing-expression/runtime.ts:116
↓ 2 callers
Function
toCsvLine
(cells: string[])
web/src/features/usage-logs/lib/export.ts:101
↓ 2 callers
Function
toFormValues
(config: HeaderNavModulesConfig)
web/src/features/system-settings/maintenance/header-navigation-section.tsx:69
↓ 2 callers
Function
toInt
(value: unknown, fallback: number)
web/src/features/models/components/dialogs/extend-deployment-dialog.tsx:35
↓ 2 callers
Function
toOllamaResponseFormat
(responseFormat *dto.ResponseFormat)
relay/channel/ollama/relay-ollama.go:21
↓ 2 callers
Function
toUnix
(ts string)
relay/channel/ollama/stream.go:127
↓ 2 callers
Function
toUptimePct
(value: number)
web/src/features/pricing/components/model-details-performance.tsx:87
↓ 2 callers
Function
toValueText
(value: unknown)
web/src/features/channels/components/dialogs/param-override-editor-dialog.tsx:458
↓ 2 callers
Function
toWebSocketURL
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
← previous
next →
4,801–4,900 of 15,592, ranked by callers