MCPcopy Create free account

hub / github.com/Rfym21/Qwen2API / functions

Functions346 in github.com/Rfym21/Qwen2API

↓ 2 callersFunctionbuildRequiredRetryHint
(toolChoice)
src/controllers/chat.js:65
↓ 2 callersFunctionbuildRetryHint
(toolChoice)
src/controllers/anthropic.js:288
↓ 2 callersFunctionbuildToolSystemPrompt
(tools, options = {})
src/utils/tool-prompt.js:81
↓ 2 callersFunctionconnectRedis
()
src/utils/redis.js:228
↓ 2 callersFunctioncreateToolCallStreamParser
()
src/utils/tool-prompt.js:267
↓ 2 callersFunctioncustomEncode
(data, urlSafe)
src/utils/cookie-generator.js:241
↓ 2 callersFunctiondelay
(ms)
src/utils/upload.js:60
↓ 2 callersFunctionemitThinkingDelta
(thinking)
src/controllers/anthropic.js:425
↓ 2 callersFunctionemitToolUse
(call)
src/controllers/anthropic.js:471
↓ 2 callersFunctionensureStats
(account)
src/utils/account.js:20
↓ 2 callersFunctionescapeAttr
(value)
src/utils/tool-prompt.js:193
↓ 2 callersFunctionfoldToolMessages
(messages)
src/utils/tool-prompt.js:140
↓ 2 callersFunctionformatPayloadForLog
(payload)
src/controllers/chat.image.video.js:47
↓ 2 callersFunctiongenerateChatID
(currentToken, model, account)
src/utils/request.js:174
↓ 2 callersMethodgetAccountByToken
* 根据令牌反查账户对象(用于只持有 token 的下游调用解析账号级代理) * @param {string} token - 访问令牌 * @returns {Object|null} 账户对象或 null
src/utils/account.js:524
↓ 2 callersFunctiongetImageMarkdownListFromDelta
(delta)
src/controllers/chat.js:33
↓ 2 callersMethodgetNextAccount
* 获取下一个可用的账户对象 * @returns {Object|null} 账户对象或 null
src/utils/account-rotator.js:41
↓ 2 callersMethodgetStats
* 获取账户统计信息 * @returns {Object} 统计信息
src/utils/account-rotator.js:151
↓ 2 callersFunctiongetVideoTaskStatus
(videoTaskID, token)
src/controllers/chat.image.video.js:1851
↓ 2 callersFunctionisMediaContentItem
(item)
src/utils/chat-helpers.js:75
↓ 2 callersFunctionisRetryableNetworkError
(error)
src/utils/request.js:18
↓ 2 callersFunctionisRetryableUpstreamError
(upstreamError)
src/controllers/chat.image.video.js:552
↓ 2 callersFunctionisThinkingEnabled
(model, enable_thinking, thinking_budget)
src/utils/chat-helpers.js:213
↓ 2 callersFunctionmakeCliTextPart
(text)
src/controllers/cli.chat.js:104
↓ 2 callersFunctionnormalizeMediaContentItem
(item, imgCacheManager)
src/utils/chat-helpers.js:137
↓ 2 callersFunctionparseAccountLine
(line)
src/utils/account-parser.js:19
↓ 2 callersFunctionparseMaybeJSON
(value)
src/controllers/chat.image.video.js:590
↓ 2 callersFunctionparseUpstreamImageErrorFromText
(text)
src/controllers/chat.image.video.js:141
↓ 2 callersFunctionparserMessages
(messages, thinking_config, chat_type)
src/utils/chat-helpers.js:306
↓ 2 callersFunctionpipeUpstream
(upstreamResponse)
src/controllers/chat.js:368
↓ 2 callersMethodpollForToken
* 轮询获取访问令牌 * @param {string} device_code - 设备代码 * @param {string} code_verifier - 代码验证器 * @param {Object} [account] - Qwen 账户对象(用于解析账号级
src/utils/cli.manager.js:181
↓ 2 callersFunctionpushBatchTaskResult
(task, result)
src/routes/accounts.js:115
↓ 2 callersFunctionpushVideoTaskCandidate
(taskID)
src/controllers/chat.image.video.js:867
↓ 2 callersFunctionrandomHash
()
src/utils/cookie-generator.js:264
↓ 2 callersFunctionreadVideoUpstreamResult
(responseStream)
src/controllers/chat.image.video.js:846
↓ 2 callersMethodrefreshAccountToken
* 手动刷新指定账户的令牌 * @param {string} email - 邮箱地址 * @returns {Promise<boolean>} 刷新是否成功
src/utils/account.js:563
↓ 2 callersFunctionrequiresToolCall
(toolChoice)
src/controllers/chat.js:52
↓ 2 callersFunctionrequiresToolCall
(toolChoice)
src/controllers/anthropic.js:277
↓ 2 callersFunctionrunBatchAccountTask
(task, newAccounts)
src/routes/accounts.js:235
↓ 2 callersFunctionsendUpstreamError
(res, upstreamError)
src/controllers/chat.image.video.js:566
↓ 2 callersMethodserver
(message, module = '', data = null)
src/utils/logger.js:303
↓ 2 callersFunctionsha256Encrypt
(text)
src/utils/tools.js:19
↓ 2 callersFunctionsplitModelSuffix
(model)
src/utils/chat-helpers.js:26
↓ 2 callersFunctionvalidateFileSize
(fileSize)
src/utils/upload.js:32
↓ 1 callersMethod_cleanupRecords
* 清理不存在账户的记录 * @private
src/utils/account-rotator.js:272
↓ 1 callersFunction_dateKeyDaysAgo
(n)
src/utils/account.js:62
↓ 1 callersMethod_delay
* 延迟函数 * @param {number} ms - 延迟毫秒数 * @private
src/utils/token-manager.js:252
↓ 1 callersMethod_delay
* 延迟函数 * @param {number} ms - 延迟毫秒数 * @private
src/utils/account.js:994
↓ 1 callersMethod_getAccountByRoundRobin
* 轮询策略获取账户对象 * @returns {Object|null} 账户对象或null * @private
src/utils/account-rotator.js:238
↓ 1 callersFunction_getTodayKey
()
src/utils/account.js:60
↓ 1 callersFunction_getYesterdayKey
()
src/utils/account.js:61
↓ 1 callersFunction_hasNonZeroStats
(stats)
src/utils/account.js:64
↓ 1 callersMethod_initialize
* 异步初始化 * @private
src/utils/account.js:106
↓ 1 callersMethod_loadFromEnv
* 从环境变量加载账户数据 * @private
src/utils/data-persistence.js:188
↓ 1 callersMethod_loadFromFile
* 从文件加载账户数据 * @private
src/utils/data-persistence.js:174
↓ 1 callersMethod_loadFromRedis
* 从 Redis 加载账户数据 * @private
src/utils/data-persistence.js:165
↓ 1 callersMethod_loadSettingsFromFile
()
src/utils/data-persistence.js:120
↓ 1 callersMethod_loginEnvironmentAccounts
* 为环境变量模式的账户进行登录 * @private
src/utils/account.js:178
↓ 1 callersMethod_saveAllToFile
* 批量保存到文件 * @private
src/utils/data-persistence.js:272
↓ 1 callersMethod_saveAllToRedis
* 批量保存到 Redis * @private
src/utils/data-persistence.js:259
↓ 1 callersMethod_saveSettingsToFile
(partial)
src/utils/data-persistence.js:127
↓ 1 callersMethod_saveToFile
* 保存到文件(MERGE 语义) * partial save(仅 token、proxy、stats)不应覆盖未传字段——保留 existing 值 * @private
src/utils/data-persistence.js:222
↓ 1 callersMethod_selectLeastUsedAccount
* 选择最少使用的账户 * @param {Array} accounts - 可用账户列表 * @returns {Object} 选中的账户 * @private
src/utils/account-rotator.js:219
↓ 1 callersMethod_setupDailyResetTimer
* 设置每日重置定时器 * @private
src/utils/account.js:249
↓ 1 callersMethod_validateAndCleanTokens
* 验证和清理无效令牌 * @private
src/utils/account.js:378
↓ 1 callersMethodaddAccount
* 添加新账户 * @param {string} email - 邮箱 * @param {string} password - 密码 * @param {string|null} [proxy] - 账号专属代理 URL(HTTP/HTTPS/SOCKS5)
src/utils/account.js:758
↓ 1 callersMethodaddAccountWithToken
* 直接添加账户(已有token,无需登录) * @param {string} email - 邮箱 * @param {string} password - 密码 * @param {string} token - 已获取的令牌 * @param {num
src/utils/account.js:827
↓ 1 callersMethodaddCache
(signature, url)
src/utils/img-caches.js:25
↓ 1 callersFunctionanalyzeAnthropicCompatibility
(requestBody = {})
src/controllers/anthropic.compatibility.js:32
↓ 1 callersFunctionappendCliSystemContent
(systemParts, content)
src/controllers/cli.chat.js:111
↓ 1 callersFunctionapplyPersistedSettings
()
src/server.js:73
↓ 1 callersMethodarchiveYesterdayForTest
* Debug: manual trigger for archive/reset (used by the dev endpoint). * The readiness guard prevents wiping data.accounts = [] before init finish
src/utils/account.js:356
↓ 1 callersMethodauthorizeLogin
* 授权登录 * @param {string} user_code - 用户代码 * @param {string} access_token - 访问令牌 * @param {Object} [account] - Qwen 账户对象(用于解析账号级代理)
src/utils/cli.manager.js:134
↓ 1 callersFunctionbindRedisEvents
(client)
src/utils/redis.js:188
↓ 1 callersFunctionbuildAnthropicCompatibilityHeaders
({ partialFields = [], ignoredFields = [], futureRiskFields = [] } = {})
src/controllers/anthropic.compatibility.js:71
↓ 1 callersFunctionbuildCliAxiosErrorLog
* 构造 CLI 错误日志上下文 * @param {Error} error - 错误对象 * @returns {Promise<object>} 日志上下文
src/controllers/cli.chat.js:235
↓ 1 callersFunctionbuildImageContent
(contentUrl)
src/controllers/chat.image.video.js:576
↓ 1 callersFunctionbuildInternalRequest
(anthropicReq)
src/controllers/anthropic.js:189
↓ 1 callersMethodcleanOldLogFiles
* 清理旧的日志文件
src/utils/logger.js:206
↓ 1 callersFunctioncollectRequestMediaItems
(req, fieldName, mediaType)
src/controllers/chat.image.video.js:808
↓ 1 callersFunctioncompressSchemaType
(schema)
src/utils/tool-prompt.js:21
↓ 1 callersFunctioncountMessagesTokens
* 计算消息数组的token数量 * @param {Array} messages - 消息数组 * @param {string} model - 模型名称 * @returns {number} 总token数量
src/utils/precise-tokenizer.js:31
↓ 1 callersFunctioncreateBatchAccountTask
(total, valid, skipped, invalid)
src/routes/accounts.js:83
↓ 1 callersFunctioncreateRedisConfig
()
src/utils/redis.js:46
↓ 1 callersFunctiondelay
(ms)
src/utils/request.js:27
↓ 1 callersFunctiondeleteAccount
(key)
src/utils/redis.js:468
↓ 1 callersFunctiondetectLocale
()
public/src/main.js:13
↓ 1 callersFunctiondownloadAssetAsBase64
(contentUrl, account)
src/controllers/chat.image.video.js:666
↓ 1 callersFunctionemitAnswerContent
(text)
src/controllers/chat.js:178
↓ 1 callersFunctionensureArray
(value)
src/controllers/chat.image.video.js:612
↓ 1 callersFunctionensureCliSystemMessage
(messages)
src/controllers/cli.chat.js:145
↓ 1 callersFunctionextractInlineMediaURL
(value, mediaType)
src/controllers/chat.image.video.js:706
↓ 1 callersFunctionextractResourceUrlFromText
(text)
src/controllers/chat.image.video.js:217
↓ 1 callersFunctionextractResponseIDsFromText
(text)
src/controllers/chat.image.video.js:269
↓ 1 callersFunctionextractTextFromContent
(content)
src/utils/chat-helpers.js:258
↓ 1 callersFunctionextractVideoTaskIDFromText
(text)
src/controllers/chat.image.video.js:241
↓ 1 callersFunctionfindMatchedModel
(models, modelName)
src/utils/chat-helpers.js:50
↓ 1 callersFunctionflattenAnthropicMessages
(messages)
src/controllers/anthropic.js:100
↓ 1 callersFunctionformatCliJsonResponse
(data, fallbackModel)
src/controllers/cli.chat.js:262
↓ 1 callersFunctionformatHistoryMessages
(messages)
src/utils/chat-helpers.js:286
← previousnext →101–200 of 346, ranked by callers