Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Rfym21/Qwen2API
/ functions
Functions
346 in github.com/Rfym21/Qwen2API
⨍
Functions
346
◇
Types & classes
14
↓ 2 callers
Function
buildRequiredRetryHint
(toolChoice)
src/controllers/chat.js:65
↓ 2 callers
Function
buildRetryHint
(toolChoice)
src/controllers/anthropic.js:288
↓ 2 callers
Function
buildToolSystemPrompt
(tools, options = {})
src/utils/tool-prompt.js:81
↓ 2 callers
Function
connectRedis
()
src/utils/redis.js:228
↓ 2 callers
Function
createToolCallStreamParser
()
src/utils/tool-prompt.js:267
↓ 2 callers
Function
customEncode
(data, urlSafe)
src/utils/cookie-generator.js:241
↓ 2 callers
Function
delay
(ms)
src/utils/upload.js:60
↓ 2 callers
Function
emitThinkingDelta
(thinking)
src/controllers/anthropic.js:425
↓ 2 callers
Function
emitToolUse
(call)
src/controllers/anthropic.js:471
↓ 2 callers
Function
ensureStats
(account)
src/utils/account.js:20
↓ 2 callers
Function
escapeAttr
(value)
src/utils/tool-prompt.js:193
↓ 2 callers
Function
foldToolMessages
(messages)
src/utils/tool-prompt.js:140
↓ 2 callers
Function
formatPayloadForLog
(payload)
src/controllers/chat.image.video.js:47
↓ 2 callers
Function
generateChatID
(currentToken, model, account)
src/utils/request.js:174
↓ 2 callers
Method
getAccountByToken
* 根据令牌反查账户对象(用于只持有 token 的下游调用解析账号级代理) * @param {string} token - 访问令牌 * @returns {Object|null} 账户对象或 null
src/utils/account.js:524
↓ 2 callers
Function
getImageMarkdownListFromDelta
(delta)
src/controllers/chat.js:33
↓ 2 callers
Method
getNextAccount
* 获取下一个可用的账户对象 * @returns {Object|null} 账户对象或 null
src/utils/account-rotator.js:41
↓ 2 callers
Method
getStats
* 获取账户统计信息 * @returns {Object} 统计信息
src/utils/account-rotator.js:151
↓ 2 callers
Function
getVideoTaskStatus
(videoTaskID, token)
src/controllers/chat.image.video.js:1851
↓ 2 callers
Function
isMediaContentItem
(item)
src/utils/chat-helpers.js:75
↓ 2 callers
Function
isRetryableNetworkError
(error)
src/utils/request.js:18
↓ 2 callers
Function
isRetryableUpstreamError
(upstreamError)
src/controllers/chat.image.video.js:552
↓ 2 callers
Function
isThinkingEnabled
(model, enable_thinking, thinking_budget)
src/utils/chat-helpers.js:213
↓ 2 callers
Function
makeCliTextPart
(text)
src/controllers/cli.chat.js:104
↓ 2 callers
Function
normalizeMediaContentItem
(item, imgCacheManager)
src/utils/chat-helpers.js:137
↓ 2 callers
Function
parseAccountLine
(line)
src/utils/account-parser.js:19
↓ 2 callers
Function
parseMaybeJSON
(value)
src/controllers/chat.image.video.js:590
↓ 2 callers
Function
parseUpstreamImageErrorFromText
(text)
src/controllers/chat.image.video.js:141
↓ 2 callers
Function
parserMessages
(messages, thinking_config, chat_type)
src/utils/chat-helpers.js:306
↓ 2 callers
Function
pipeUpstream
(upstreamResponse)
src/controllers/chat.js:368
↓ 2 callers
Method
pollForToken
* 轮询获取访问令牌 * @param {string} device_code - 设备代码 * @param {string} code_verifier - 代码验证器 * @param {Object} [account] - Qwen 账户对象(用于解析账号级
src/utils/cli.manager.js:181
↓ 2 callers
Function
pushBatchTaskResult
(task, result)
src/routes/accounts.js:115
↓ 2 callers
Function
pushVideoTaskCandidate
(taskID)
src/controllers/chat.image.video.js:867
↓ 2 callers
Function
randomHash
()
src/utils/cookie-generator.js:264
↓ 2 callers
Function
readVideoUpstreamResult
(responseStream)
src/controllers/chat.image.video.js:846
↓ 2 callers
Method
refreshAccountToken
* 手动刷新指定账户的令牌 * @param {string} email - 邮箱地址 * @returns {Promise<boolean>} 刷新是否成功
src/utils/account.js:563
↓ 2 callers
Function
requiresToolCall
(toolChoice)
src/controllers/chat.js:52
↓ 2 callers
Function
requiresToolCall
(toolChoice)
src/controllers/anthropic.js:277
↓ 2 callers
Function
runBatchAccountTask
(task, newAccounts)
src/routes/accounts.js:235
↓ 2 callers
Function
sendUpstreamError
(res, upstreamError)
src/controllers/chat.image.video.js:566
↓ 2 callers
Method
server
(message, module = '', data = null)
src/utils/logger.js:303
↓ 2 callers
Function
sha256Encrypt
(text)
src/utils/tools.js:19
↓ 2 callers
Function
splitModelSuffix
(model)
src/utils/chat-helpers.js:26
↓ 2 callers
Function
validateFileSize
(fileSize)
src/utils/upload.js:32
↓ 1 callers
Method
_cleanupRecords
* 清理不存在账户的记录 * @private
src/utils/account-rotator.js:272
↓ 1 callers
Function
_dateKeyDaysAgo
(n)
src/utils/account.js:62
↓ 1 callers
Method
_delay
* 延迟函数 * @param {number} ms - 延迟毫秒数 * @private
src/utils/token-manager.js:252
↓ 1 callers
Method
_delay
* 延迟函数 * @param {number} ms - 延迟毫秒数 * @private
src/utils/account.js:994
↓ 1 callers
Method
_getAccountByRoundRobin
* 轮询策略获取账户对象 * @returns {Object|null} 账户对象或null * @private
src/utils/account-rotator.js:238
↓ 1 callers
Function
_getTodayKey
()
src/utils/account.js:60
↓ 1 callers
Function
_getYesterdayKey
()
src/utils/account.js:61
↓ 1 callers
Function
_hasNonZeroStats
(stats)
src/utils/account.js:64
↓ 1 callers
Method
_initialize
* 异步初始化 * @private
src/utils/account.js:106
↓ 1 callers
Method
_loadFromEnv
* 从环境变量加载账户数据 * @private
src/utils/data-persistence.js:188
↓ 1 callers
Method
_loadFromFile
* 从文件加载账户数据 * @private
src/utils/data-persistence.js:174
↓ 1 callers
Method
_loadFromRedis
* 从 Redis 加载账户数据 * @private
src/utils/data-persistence.js:165
↓ 1 callers
Method
_loadSettingsFromFile
()
src/utils/data-persistence.js:120
↓ 1 callers
Method
_loginEnvironmentAccounts
* 为环境变量模式的账户进行登录 * @private
src/utils/account.js:178
↓ 1 callers
Method
_saveAllToFile
* 批量保存到文件 * @private
src/utils/data-persistence.js:272
↓ 1 callers
Method
_saveAllToRedis
* 批量保存到 Redis * @private
src/utils/data-persistence.js:259
↓ 1 callers
Method
_saveSettingsToFile
(partial)
src/utils/data-persistence.js:127
↓ 1 callers
Method
_saveToFile
* 保存到文件(MERGE 语义) * partial save(仅 token、proxy、stats)不应覆盖未传字段——保留 existing 值 * @private
src/utils/data-persistence.js:222
↓ 1 callers
Method
_selectLeastUsedAccount
* 选择最少使用的账户 * @param {Array} accounts - 可用账户列表 * @returns {Object} 选中的账户 * @private
src/utils/account-rotator.js:219
↓ 1 callers
Method
_setupDailyResetTimer
* 设置每日重置定时器 * @private
src/utils/account.js:249
↓ 1 callers
Method
_validateAndCleanTokens
* 验证和清理无效令牌 * @private
src/utils/account.js:378
↓ 1 callers
Method
addAccount
* 添加新账户 * @param {string} email - 邮箱 * @param {string} password - 密码 * @param {string|null} [proxy] - 账号专属代理 URL(HTTP/HTTPS/SOCKS5)
src/utils/account.js:758
↓ 1 callers
Method
addAccountWithToken
* 直接添加账户(已有token,无需登录) * @param {string} email - 邮箱 * @param {string} password - 密码 * @param {string} token - 已获取的令牌 * @param {num
src/utils/account.js:827
↓ 1 callers
Method
addCache
(signature, url)
src/utils/img-caches.js:25
↓ 1 callers
Function
analyzeAnthropicCompatibility
(requestBody = {})
src/controllers/anthropic.compatibility.js:32
↓ 1 callers
Function
appendCliSystemContent
(systemParts, content)
src/controllers/cli.chat.js:111
↓ 1 callers
Function
applyPersistedSettings
()
src/server.js:73
↓ 1 callers
Method
archiveYesterdayForTest
* 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 callers
Method
authorizeLogin
* 授权登录 * @param {string} user_code - 用户代码 * @param {string} access_token - 访问令牌 * @param {Object} [account] - Qwen 账户对象(用于解析账号级代理)
src/utils/cli.manager.js:134
↓ 1 callers
Function
bindRedisEvents
(client)
src/utils/redis.js:188
↓ 1 callers
Function
buildAnthropicCompatibilityHeaders
({ partialFields = [], ignoredFields = [], futureRiskFields = [] } = {})
src/controllers/anthropic.compatibility.js:71
↓ 1 callers
Function
buildCliAxiosErrorLog
* 构造 CLI 错误日志上下文 * @param {Error} error - 错误对象 * @returns {Promise<object>} 日志上下文
src/controllers/cli.chat.js:235
↓ 1 callers
Function
buildImageContent
(contentUrl)
src/controllers/chat.image.video.js:576
↓ 1 callers
Function
buildInternalRequest
(anthropicReq)
src/controllers/anthropic.js:189
↓ 1 callers
Method
cleanOldLogFiles
* 清理旧的日志文件
src/utils/logger.js:206
↓ 1 callers
Function
collectRequestMediaItems
(req, fieldName, mediaType)
src/controllers/chat.image.video.js:808
↓ 1 callers
Function
compressSchemaType
(schema)
src/utils/tool-prompt.js:21
↓ 1 callers
Function
countMessagesTokens
* 计算消息数组的token数量 * @param {Array} messages - 消息数组 * @param {string} model - 模型名称 * @returns {number} 总token数量
src/utils/precise-tokenizer.js:31
↓ 1 callers
Function
createBatchAccountTask
(total, valid, skipped, invalid)
src/routes/accounts.js:83
↓ 1 callers
Function
createRedisConfig
()
src/utils/redis.js:46
↓ 1 callers
Function
delay
(ms)
src/utils/request.js:27
↓ 1 callers
Function
deleteAccount
(key)
src/utils/redis.js:468
↓ 1 callers
Function
detectLocale
()
public/src/main.js:13
↓ 1 callers
Function
downloadAssetAsBase64
(contentUrl, account)
src/controllers/chat.image.video.js:666
↓ 1 callers
Function
emitAnswerContent
(text)
src/controllers/chat.js:178
↓ 1 callers
Function
ensureArray
(value)
src/controllers/chat.image.video.js:612
↓ 1 callers
Function
ensureCliSystemMessage
(messages)
src/controllers/cli.chat.js:145
↓ 1 callers
Function
extractInlineMediaURL
(value, mediaType)
src/controllers/chat.image.video.js:706
↓ 1 callers
Function
extractResourceUrlFromText
(text)
src/controllers/chat.image.video.js:217
↓ 1 callers
Function
extractResponseIDsFromText
(text)
src/controllers/chat.image.video.js:269
↓ 1 callers
Function
extractTextFromContent
(content)
src/utils/chat-helpers.js:258
↓ 1 callers
Function
extractVideoTaskIDFromText
(text)
src/controllers/chat.image.video.js:241
↓ 1 callers
Function
findMatchedModel
(models, modelName)
src/utils/chat-helpers.js:50
↓ 1 callers
Function
flattenAnthropicMessages
(messages)
src/controllers/anthropic.js:100
↓ 1 callers
Function
formatCliJsonResponse
(data, fallbackModel)
src/controllers/cli.chat.js:262
↓ 1 callers
Function
formatHistoryMessages
(messages)
src/utils/chat-helpers.js:286
← previous
next →
101–200 of 346, ranked by callers