MCPcopy Create free account

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

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

↓ 2 callersFunctionsetProtocolRequestBackground
(c *gin.Context, background bool)
controller/plugin_protocol_test.go:1556
↓ 2 callersMethodsetTarget
(target *websocket.Conn)
relay/responses_websocket.go:846
↓ 2 callersFunctionsetTaskImageCount
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 callersFunctionsetTaskMediaResponseSecurityHeaders
(header http.Header)
controller/video_proxy.go:656
↓ 2 callersFunctionsetTokenAutoGroups
(c *gin.Context, token *model.Token, groups []string)
controller/token.go:92
↓ 2 callersFunctionsetVariant
(newVariant: Variant)
web/src/context/layout-provider.tsx:73
↓ 2 callersFunctionsettleTestQuota
(info *relaycommon.RelayInfo, priceData hosttypes.PriceData, usage *dto.Usage)
controller/channel-test.go:584
↓ 2 callersFunctionsetupEpayCallbackTest
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 callersFunctionsetupLoginAtAuthVersion
(user *model.User, expectedAuthVersion int64, c *gin.Context)
controller/user.go:164
↓ 2 callersFunctionshouldAuditParamPath
(path string)
relay/common/override.go:416
↓ 2 callersFunctionshouldLoadTaskArtifacts
( log: TaskLog, dialogOpen: boolean )
web/src/features/usage-logs/lib/task-artifacts.ts:204
↓ 2 callersFunctionshouldMatchStatusCodeRanges
(ranges []StatusCodeRange, code int)
setting/operation_setting/status_code_ranges.go:102
↓ 2 callersFunctionshouldSendUpstreamModelUpdateNotification
(now int64, changedChannels int, failedChannels int)
controller/channel_upstream_update.go:658
↓ 2 callersFunctionshouldShowBillingSource
( input: BillingSourceVisibilityInput )
web/src/features/usage-logs/lib/billing-source.ts:37
↓ 2 callersFunctionshouldSkipClaudeMessageDeltaUsagePatch
(info *relaycommon.RelayInfo)
relay/channel/claude/relay-claude.go:71
↓ 2 callersFunctionshouldUseDiskCache
shouldUseDiskCache 判断是否应该使用磁盘缓存
service/file_service.go:239
↓ 2 callersFunctionsizeDimensions
(size)
plugins/tasks/kling/plugin.js:186
↓ 2 callersFunctionsizeParts
(size)
plugins/tasks/google/plugin.js:118
↓ 2 callersFunctionsizeParts
(size)
plugins/tasks/vertex-ai/plugin.js:296
↓ 2 callersFunctionsizePixels
(size)
plugins/tasks/alibaba/plugin.js:502
↓ 2 callersFunctionsortModels
( models: PricingModel[], sortBy: string, modelOrder?: ModelOrder )
web/src/features/pricing/lib/filters.ts:215
↓ 2 callersFunctionsortedRankingBuckets
(bucketSet map[int64]struct{})
service/rankings.go:515
↓ 2 callersFunctionsourceMenu
()
web/src/features/task-plugins/__tests__/marketplace-panel.test.tsx:120
↓ 2 callersFunctionsplitExpressionAtTopLevel
( source: string, operator: string )
web/src/features/pricing/lib/billing-expression/structure.ts:20
↓ 2 callersFunctionsplitHeaderListValue
(raw string)
relay/common/override.go:1391
↓ 2 callersFunctionsplitShebang
(text)
web/scripts/add-copyright.mjs:139
↓ 2 callersFunctionsplitTopLevelMultiply
(expr: string)
web/src/features/pricing/lib/billing-expr.ts:364
↓ 2 callersFunctionsplitWords
(value: string)
web/src/components/ai-elements/response-fade.ts:109
↓ 2 callersFunctionsqliteDSN
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 callersFunctionstale
()
web/src/features/channels/hooks/use-plugin-login.ts:75
↓ 2 callersMethodstart
()
pluginkit/engine.go:826
↓ 2 callersFunctionstartOAuthBindResponseDeadline
( onTimeout: () => void, delay = 30_000, runtime: TimerRuntime = timeoutRuntime )
web/src/features/auth/lib/oauth-bind-window.ts:98
↓ 2 callersFunctionstartOAuthBinding
(provider: string)
web/src/features/security/components/account-bindings.tsx:143
↓ 2 callersFunctionstartPendingToolBlocks
(state *convmeta.ClaudeConvertInfo)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp.go:49
↓ 2 callersMethodstartText
()
relaykit/relayconvert/internal/oai_chat/to_oai_responses_stream_resp.go:426
↓ 2 callersFunctionstateMember
stateMember reads the state member of a result as JSON text, nil when the result has none.
pluginkit/provider.go:840
↓ 2 callersMethodstateValue
stateValue is value with ctx.state, null when the plugin has set none.
pluginkit/provider.go:275
↓ 2 callersFunctionstatusCodeRangesToString
(ranges []StatusCodeRange)
setting/operation_setting/status_code_ranges.go:87
↓ 2 callersMethodstop
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 callersMethodstopBlock
(block *responsesClaudeStreamBlock, estimatedInputTokens int)
relaykit/relayconvert/internal/oai_responses/to_claude_messages_stream_resp.go:364
↓ 2 callersFunctionstopCloseWatcher
()
web/src/features/auth/lib/oauth-popup.ts:64
↓ 2 callersMethodstopIdle
()
relay/channel/providerplugin/stream.go:221
↓ 2 callersFunctionstopOpenBlocks
(state *convmeta.ClaudeConvertInfo)
relaykit/relayconvert/internal/oai_chat/to_claude_messages_resp.go:22
↓ 2 callersFunctionstopReasonCohere2OpenAI
(reason string)
relay/channel/cohere/relay-cohere.go:72
↓ 2 callersMethodstopStream
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 callersFunctionstorageKeyFor
(key: string)
web/src/components/floating-window.tsx:105
↓ 2 callersMethodstore
(fullKey string, client *http.Client)
service/http_client.go:217
↓ 2 callersFunctionstoreTaskRequest
(c *gin.Context, info *RelayInfo, action string, requestObj TaskSubmitReq)
relay/common/relay_utils.go:120
↓ 2 callersMethodstream
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 callersFunctionstreamLogs
(tx *gorm.DB, order string, fn func(*Log) error)
model/log.go:666
↓ 2 callersFunctionstreamResponseGeminiChat2OpenAI
(geminiResponse *dto.GeminiChatResponse)
relaykit/relayconvert/internal/gemini_chat/to_oai_chat_resp.go:198
↓ 2 callersFunctionstreamResponseGeminiChat2OpenAI
(geminiResponse *dto.GeminiChatResponse)
relay/channel/gemini/relay-gemini.go:292
↓ 2 callersFunctionstreamsInterleave
(ctx)
plugins/tasks/alibaba/plugin.js:406
↓ 2 callersFunctionstringInt
(value int)
controller/token_auto_groups_test.go:37
↓ 2 callersFunctionstringMapMember
(object map[string]any, name, subject string)
pluginkit/provider.go:1808
↓ 2 callersFunctionstringSlice
(value any)
relaykit/relayconvert/internal/toolconv/decode.go:906
↓ 2 callersFunctionstringToColor
(str: string)
web/src/lib/colors.ts:178
↓ 2 callersFunctionsubmitImageCount
(req)
plugins/tasks/jimeng/plugin.js:203
↓ 2 callersFunctionsubscriptionPlanCacheKey
(id int)
model/subscription.go:128
↓ 2 callersFunctionsubscriptionPlanCacheTTL
()
model/subscription.go:54
↓ 2 callersFunctionsubscriptionPlanInfoCacheTTL
()
model/subscription.go:62
↓ 2 callersFunctionsummarize
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 callersFunctionsummarize
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 callersFunctionsupportsChannelPluginExtensions
(channelType: number)
web/src/features/channels/lib/channel-plugin-extensions.ts:39
↓ 2 callersMethodsyncRelayInfo
syncRelayInfo 将 BillingSession 的状态同步到 RelayInfo 的兼容字段上。
service/billing_session.go:365
↓ 2 callersFunctionsyncToCommon
syncToCommon 将配置同步到 common 包
setting/performance_setting/config.go:50
↓ 2 callersFunctionsyncTopicLabel
(topic: string, t: TFunction)
web/src/features/system-info/lib/node-sync.ts:38
↓ 2 callersFunctionsystemInstanceSyncStates
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 callersFunctionsystemTaskLockUntil
()
service/system_task.go:459
↓ 2 callersFunctiontableHasCompactMeta
(table: Table<TData>)
web/src/components/data-table/layout/card-cell-utils.ts:54
↓ 2 callersMethodtake
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 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:1261
↓ 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:720
↓ 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:103
↓ 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:765
↓ 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
← previousnext →4,801–4,900 of 15,592, ranked by callers