Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/YuJunZhiXue/qwen2API
/ functions
Functions
1,037 in github.com/YuJunZhiXue/qwen2API
⨍
Functions
1,037
◇
Types & classes
114
↓ 85 callers
Function
stringValue
(m map[string]any, key, fallback string)
backend/main.go:8919
↓ 64 callers
Method
Lock
(key string)
backend/core/session_lock.go:14
↓ 62 callers
Method
logInfo
(ctx context.Context, msg string, attrs ...any)
backend/main.go:8598
↓ 59 callers
Method
logWarn
(ctx context.Context, msg string, attrs ...any)
backend/main.go:8604
↓ 57 callers
Function
stringValue
(m map[string]any, key, fallback string)
backend/adapter/standard_request.go:1995
↓ 54 callers
Function
writeError
(w http.ResponseWriter, status int, detail any)
backend/main.go:8908
↓ 46 callers
Function
anyString
(v any, fallback string)
backend/main.go:8930
↓ 46 callers
Function
toolParseText
(result CompletionResult)
backend/main.go:7211
↓ 41 callers
Function
firstNonEmpty
(values ...string)
backend/main.go:6336
↓ 37 callers
Function
truncate
(text string, limit int)
backend/main.go:9066
↓ 37 callers
Function
writeJSON
(w http.ResponseWriter, status int, payload any)
backend/main.go:8902
↓ 33 callers
Function
writeSSEEvent
(w io.Writer, event string, payload any)
backend/main.go:7112
↓ 31 callers
Method
Write
(data []byte)
backend/main.go:8401
↓ 29 callers
Function
promptTail
(text string, limit int)
backend/main.go:8667
↓ 26 callers
Function
envInt
(key string, fallback int)
backend/main.go:2122
↓ 26 callers
Function
getAuthHeader
()
frontend/src/lib/auth.ts:65
↓ 25 callers
Function
logInfo
(logger *slog.Logger, ctx context.Context, msg string, attrs ...any)
backend/main.go:8616
↓ 23 callers
Function
asText
(value: unknown)
frontend/src/pages/TestPage.tsx:69
↓ 23 callers
Function
logWarn
(logger *slog.Logger, ctx context.Context, msg string, attrs ...any)
backend/main.go:8622
↓ 23 callers
Function
u16
(value: number)
frontend/src/pages/AccountsPage.tsx:311
↓ 21 callers
Function
anyList
(v any)
backend/main.go:8995
↓ 18 callers
Method
logParsedToolCalls
(ctx context.Context, label, stage string, calls []ParsedToolCall)
backend/main.go:7224
↓ 18 callers
Function
maxInt
(a, b int)
backend/main.go:882
↓ 18 callers
Function
openAIChunk
(id string, created int64, model string, delta map[string]any, finish any)
backend/main.go:7103
↓ 17 callers
Function
firstNonNil
(values ...any)
backend/main.go:5318
↓ 16 callers
Method
Add
(acc Account)
backend/main.go:458
↓ 16 callers
Function
clipText
(text string, limit int)
backend/adapter/standard_request.go:1954
↓ 16 callers
Function
intValue
(m map[string]any, key string, fallback int)
backend/main.go:8944
↓ 16 callers
Method
verifyAdmin
(w http.ResponseWriter, r *http.Request)
backend/main.go:2535
↓ 15 callers
Method
Get
(id string)
backend/services/file_store.go:37
↓ 15 callers
Function
envString
(key, fallback string)
backend/main.go:2115
↓ 15 callers
Function
mustJSON
(v any)
backend/main.go:6345
↓ 14 callers
Function
EnvInt
(key string, fallback int)
backend/core/config.go:83
↓ 14 callers
Function
anyList
(v any)
backend/adapter/standard_request.go:2042
↓ 14 callers
Function
normalizeToolNameKey
(name string)
backend/main.go:3564
↓ 13 callers
Method
Done
()
backend/runtime/stream_presenter.go:26
↓ 13 callers
Method
Release
(acc *Account)
backend/main.go:587
↓ 13 callers
Function
firstString
(values ...any)
backend/main.go:8355
↓ 13 callers
Function
firstString
(values ...any)
backend/upstream/sse_consumer.go:145
↓ 13 callers
Method
hasAny
(candidates ...string)
backend/adapter/tool_profile_common.go:145
↓ 13 callers
Function
invalidToolArgsName
(result CompletionResult)
backend/main.go:3722
↓ 13 callers
Function
isInvalidToolArgsResult
(result CompletionResult)
backend/main.go:3718
↓ 13 callers
Function
max
(a, b int)
backend/core/account_pool/pool_core.go:99
↓ 13 callers
Function
randomID
()
backend/main.go:8894
↓ 13 callers
Function
u32
(value: number)
frontend/src/pages/AccountsPage.tsx:315
↓ 12 callers
Function
decodeJSON
(r *http.Request, dst any)
backend/main.go:8912
↓ 12 callers
Function
fetchAccounts
(notify = false)
frontend/src/pages/AccountsPage.tsx:393
↓ 12 callers
Method
resolveAuth
(w http.ResponseWriter, r *http.Request)
backend/main.go:2505
↓ 11 callers
Method
LoadInto
(v any)
backend/main.go:8698
↓ 11 callers
Function
hasTextualToolMarker
(text string)
backend/main.go:7288
↓ 11 callers
Function
setRequestLogFields
(ctx context.Context, fields ...any)
backend/main.go:8507
↓ 10 callers
Method
Flush
()
backend/main.go:8410
↓ 10 callers
Function
flushSSE
(w http.ResponseWriter)
backend/main.go:7116
↓ 10 callers
Function
parsedToolNames
(calls []ParsedToolCall)
backend/main.go:7241
↓ 10 callers
Function
redactToken
(token string)
backend/main.go:8641
↓ 10 callers
Method
requestJSON
(ctx context.Context, method, path, token string, body any, timeout time.Duration)
backend/main.go:7926
↓ 10 callers
Function
requireSessionKey
()
frontend/src/pages/AccountsPage.tsx:382
↓ 9 callers
Function
asRecord
(value: unknown)
frontend/src/pages/TestPage.tsx:73
↓ 9 callers
Method
classifyAccountErrorFor
(acc *Account, err error, usage string)
backend/main.go:4370
↓ 9 callers
Function
fatalf
(format string, args ...any)
start-all.go:515
↓ 9 callers
Function
flattenContentText
(content any)
backend/context_pipeline.go:417
↓ 9 callers
Function
getString
(value: unknown)
frontend/src/pages/AccountsPage.tsx:212
↓ 9 callers
Function
isBlockedToolNameOutput
(result CompletionResult, allowedNames []string)
backend/main.go:7762
↓ 8 callers
Function
ExtractContentText
(content any)
backend/adapter/standard_request.go:1124
↓ 8 callers
Method
Save
(v any)
backend/main.go:8724
↓ 8 callers
Method
Snapshot
()
backend/main.go:386
↓ 8 callers
Function
clampInt
(value, minValue, maxValue int)
backend/main.go:2105
↓ 8 callers
Function
collectFinalizeReason
(result CompletionResult, calls []ParsedToolCall)
backend/main.go:7265
↓ 8 callers
Function
extractBlockedToolNames
(text string, allowedNames []string)
backend/main.go:7733
↓ 8 callers
Function
getStoredApiKey
()
frontend/src/lib/auth.ts:44
↓ 8 callers
Function
hasUnclosed
(openRe, closeRe *regexp.Regexp, text string)
backend/services/truncation_recovery.go:70
↓ 8 callers
Function
modelMode
(option: ModelOption)
frontend/src/lib/models.ts:75
↓ 8 callers
Method
resetLocked
()
backend/main.go:369
↓ 7 callers
Function
EnvString
(key, fallback string)
backend/core/config.go:76
↓ 7 callers
Function
NewJSONStore
(path string, defaultData any)
backend/main.go:8681
↓ 7 callers
Method
Status
()
backend/main.go:1726
↓ 7 callers
Method
Stop
()
backend/main.go:2230
↓ 7 callers
Function
anyString
(v any, fallback string)
backend/adapter/standard_request.go:1928
↓ 7 callers
Method
availableFor
(settings Settings, usage string)
backend/main.go:701
↓ 7 callers
Function
completionToolCalls
(result CompletionResult, tools []map[string]any)
backend/main.go:7281
↓ 7 callers
Function
effectiveStatusCode
(acc: AccountItem)
frontend/src/pages/AccountsPage.tsx:132
↓ 7 callers
Function
extractUserTextOnly
(content any)
backend/adapter/standard_request.go:1858
↓ 7 callers
Function
fatal
(err error)
start-all.go:510
↓ 7 callers
Function
normalizeAccountUsage
(usage string)
backend/main.go:836
↓ 7 callers
Function
parseToolCalls
(text string, tools []map[string]any)
backend/main.go:8752
↓ 7 callers
Function
qwenSafeToolName
(name string)
backend/adapter/standard_request.go:1234
↓ 7 callers
Function
renderQNMLToolCall
(name string, input map[string]any)
backend/adapter/standard_request.go:1804
↓ 7 callers
Function
repeatedToolCallName
(req StandardRequest, result CompletionResult)
backend/main.go:3758
↓ 7 callers
Method
runToolMarkupRecoveryAttempt
(ctx context.Context, acc *Account, req StandardRequest, prompt, reason string)
backend/main.go:4073
↓ 7 callers
Function
sanitizeClientErrorString
(msg string)
backend/main.go:4583
↓ 7 callers
Function
sleepWithContext
(ctx context.Context, delay time.Duration)
backend/main.go:1420
↓ 7 callers
Function
suppressBlockedToolNameOutput
(result *CompletionResult, allowedNames []string)
backend/main.go:7769
↓ 6 callers
Method
CreateChat
(ctx context.Context, token, model, chatType string)
backend/upstream/qwen_executor.go:11
↓ 6 callers
Function
appendLogAttrs
(ctx context.Context, attrs ...any)
backend/main.go:8590
↓ 6 callers
Function
appendMatches
(out *[]string, text, pattern string, submatch bool)
backend/main.go:6232
↓ 6 callers
Function
dedupeUpstreamFiles
(files []map[string]any)
backend/context_pipeline.go:888
↓ 6 callers
Function
emptyCompletionFallback
(req StandardRequest, result CompletionResult)
backend/main.go:7183
↓ 6 callers
Function
firstNonNil
(values ...any)
backend/toolcall/parser.go:128
↓ 6 callers
Function
hasAnyNonEmptyArg
(args map[string]any, names ...string)
backend/main.go:3568
↓ 6 callers
Function
randomID
()
backend/toolcall/parser.go:101
next →
1–100 of 1,037, ranked by callers