MCPcopy Create free account

hub / github.com/TQZHR/grok2api / functions

Functions1,181 in github.com/TQZHR/grok2api

↓ 1 callersMethod_flush_loop
(self)
app/services/token/manager.py:144
↓ 1 callersFunction_format_log_line
(raw: str)
app/api/v1/admin.py:1148
↓ 1 callersFunction_format_tool_definitions
(tools: list[dict[str, Any]])
app/services/compat/tooling.py:195
↓ 1 callersFunction_gather_limited
( task_factories: List[Callable[[], Awaitable[List[str]]]], max_concurrency: int, )
app/api/v1/image.py:256
↓ 1 callersFunction_get_delete_batch_size
()
app/services/grok/assets.py:65
↓ 1 callersFunction_get_runtime_token
(model: str)
app/services/compat/common.py:259
↓ 1 callersFunction_get_target
(storage_type: str, storage_url: str)
scripts/wait_for_storage.py:26
↓ 1 callersFunction_get_usage_semaphore
()
app/services/grok/usage.py:26
↓ 1 callersMethod_is_completed
(msg: Dict[str, Any], progress: Optional[float])
app/services/grok/imagine_experimental.py:140
↓ 1 callersMethod_legacy_cache_path
Legacy cache path (data/temp).
app/services/grok/assets.py:561
↓ 1 callersFunction_legacy_setting_to_config
Migrate legacy `data/setting.toml` format (grok/global) to the new config schema. Best-effort mapping only for stable fields. It does not de
app/core/config.py:48
↓ 1 callersMethod_load_data
从磁盘加载统计数据
app/services/request_stats.py:48
↓ 1 callersMethod_load_data
从磁盘加载日志数据
app/services/request_logger.py:52
↓ 1 callersMethod_load_data
加载 API Keys
app/services/api_keys.py:50
↓ 1 callersFunction_load_defaults
加载默认配置文件
app/core/config.py:207
↓ 1 callersFunction_make_json_sink
创建 JSON sink
app/core/logger.py:54
↓ 1 callersFunction_normalize_admin_token_item
(pool_name: str, item: Any)
app/api/v1/admin.py:416
↓ 1 callersFunction_normalize_anthropic_content
(role: str, content: Any)
app/services/compat/anthropic_api.py:177
↓ 1 callersFunction_normalize_asset_path
(raw: str)
app/services/compat/media.py:35
↓ 1 callersFunction_normalize_asset_path
(raw_url: str)
app/services/grok/imagine_experimental.py:55
↓ 1 callersMethod_normalize_input_token
(cls, token_str: str)
app/services/token/manager.py:170
↓ 1 callersFunction_normalize_response_content
(content: Any)
app/services/compat/responses_api.py:234
↓ 1 callersFunction_normalize_token_status
(raw_status: Any)
app/api/v1/admin.py:407
↓ 1 callersFunction_normalize_tokens
(raw_token: str)
app/core/legacy_migration.py:206
↓ 1 callersFunction_parse_alt_xml
(text: str)
app/services/compat/tooling.py:277
↓ 1 callersFunction_parse_json_array
(text: str)
app/services/compat/tooling.py:264
↓ 1 callersFunction_parse_json_envelope
(text: str)
app/services/compat/tooling.py:252
↓ 1 callersFunction_parse_xml_tool_calls
(text: str)
app/services/compat/tooling.py:234
↓ 1 callersFunction_pool_to_token_type
(pool_name: str)
app/api/v1/admin.py:384
↓ 1 callersFunction_producer
()
app/api/v1/image.py:421
↓ 1 callersMethod_rebuild_index
重建索引(预留接口,用于加载时调用)
app/services/token/pool.py:104
↓ 1 callersMethod_refresh_loop
刷新循环
app/services/token/scheduler.py:20
↓ 1 callersFunction_resolve_emit_think
(thinking: str | None)
app/services/compat/openai_chat.py:227
↓ 1 callersFunction_run
(factory: Callable[[], Awaitable[List[str]]])
app/services/grok/imagine_generation.py:64
↓ 1 callersFunction_run
(factory: Callable[[], Awaitable[List[str]]])
app/api/v1/image.py:262
↓ 1 callersFunction_safe_json
(raw: str)
app/services/compat/anthropic_api.py:241
↓ 1 callersFunction_safe_log_file_path
Resolve a log file name under ./logs safely.
app/api/v1/admin.py:1129
↓ 1 callersMethod_save_usage_data
(self)
app/services/api_keys.py:171
↓ 1 callersFunction_scan_removed_identifiers
()
scripts/check_model_catalog_sync.py:51
↓ 1 callersFunction_split_at_boundary
(text: str, prefix: str)
app/services/compat/tooling.py:335
↓ 1 callersFunction_split_csv_tags
(v: Any)
app/core/config.py:40
↓ 1 callersFunction_stream_completion
(prepared, *, emit_think: bool)
app/services/compat/openai_chat.py:146
↓ 1 callersFunction_stream_message
(prepared, *, emit_think: bool)
app/services/compat/anthropic_api.py:126
↓ 1 callersFunction_synthetic_image_stream
( selected_images: List[str], response_field: str, )
app/api/v1/image.py:457
↓ 1 callersFunction_text_stream
()
tests/test_responses_messages_api.py:32
↓ 1 callersMethod_to_asset_urls
(file_uris: List[str])
app/services/grok/imagine_experimental.py:293
↓ 1 callersFunction_tool_result_text
(content: Any)
app/services/compat/anthropic_api.py:223
↓ 1 callersFunction_trigger_account_settings_refresh_background
( tokens: list[str], concurrency: int, retries: int, )
app/api/v1/admin.py:501
↓ 1 callersMethod_tz_offset_minutes
(self)
app/services/api_keys.py:128
↓ 1 callersFunction_upload_attachments
(token: str, attachments: list[str])
app/services/compat/common.py:282
↓ 1 callersFunction_verify_ws_api_key
(websocket: WebSocket)
app/api/v1/admin.py:101
↓ 1 callersFunctionaddTokens
(db: Env["DB"], tokens: string[], token_type: TokenType)
src/repo/tokens.ts:99
↓ 1 callersMethodadd_key
添加 API Key(支持自定义 key 与每日额度)
app/services/api_keys.py:190
↓ 1 callersFunctionappendCacheBust
(url)
app/static/chat/chat.js:123
↓ 1 callersFunctionappendWaterfallImage
(item, connectionIndex)
app/static/chat/chat.js:511
↓ 1 callersFunctionapplyLogFilter
(rawLines)
app/static/datacenter/datacenter.js:195
↓ 1 callersFunctionapplyRuntimeUiFlags
()
app/static/token/token.js:203
↓ 1 callersFunctionautoLoadOnlineAssets
()
app/static/cache/cache.js:37
↓ 1 callersFunctionbatchAddApiKeys
( db: Env["DB"], name_prefix: string, count: number, )
src/repo/apiKeys.ts:59
↓ 1 callersFunctionbatchDeleteApiKeys
(db: Env["DB"], keys: string[])
src/repo/apiKeys.ts:100
↓ 1 callersFunctionbatchUpdateApiKeyStatus
( db: Env["DB"], keys: string[], is_active: boolean, )
src/repo/apiKeys.ts:115
↓ 1 callersFunctionbearerToken
(authHeader: string | null)
src/auth.ts:14
↓ 1 callersFunctionbindFileInputs
()
app/static/chat/chat.js:340
↓ 1 callersFunctionbindRetryableImages
(root)
app/static/chat/chat.js:177
↓ 1 callersFunctionbuildAnthropicJsonFromChat
( model: string, chat: Record<string, unknown>, )
src/grok/compat.ts:94
↓ 1 callersFunctionbuildCharts
()
app/static/datacenter/datacenter.js:35
↓ 1 callersFunctionbuildImageRequestConfig
()
app/static/chat/chat.js:1111
↓ 1 callersFunctionbuildImagineWsPayload
(prompt: string, requestId: string, aspectRatio: string)
src/grok/imagineExperimental.ts:133
↓ 1 callersFunctionbuildImagineWsUrl
()
app/static/chat/chat.js:553
↓ 1 callersFunctionbuildLimitsPayload
()
app/static/keys/keys.js:287
↓ 1 callersFunctionbuildResponsesJsonFromChat
( model: string, chat: Record<string, unknown>, )
src/grok/compat.ts:43
↓ 1 callersFunctionbuildToolChoiceInstruction
(toolChoice: unknown)
src/grok/tooling.ts:179
↓ 1 callersFunctionbuildToolSystemPrompt
(tools: Array<Record<string, unknown>>, toolChoice: unknown)
src/grok/tooling.ts:79
↓ 1 callersFunctionbuildVideoPosterPreview
(videoUrl: string, posterUrl?: string)
src/grok/processor.ts:108
↓ 1 callersFunctionbuildVideoTag
(src: string)
src/grok/processor.ts:104
↓ 1 callersMethodbuild_payload
构造请求体 Args: message: 消息文本 model: 模型名称 mode: 模型模式 think: 是否开启思考 f
app/services/grok/chat.py:192
↓ 1 callersFunctionbuild_tool_system_prompt
(tools: list[dict[str, Any]], tool_choice: Any = None)
app/services/compat/tooling.py:84
↓ 1 callersFunctioncalcPercent
(processed, total)
app/static/cache/cache.js:219
↓ 1 callersMethodchat_openai
OpenAI 兼容接口
app/services/grok/chat.py:392
↓ 1 callersFunctioncleanNode
(node)
app/static/chat/chat.js:241
↓ 1 callersFunctioncleanup
()
src/grok/imagineExperimental.ts:250
↓ 1 callersFunctionclearOnlineCacheBatch
(tokens = [])
app/static/cache/cache.js:1243
↓ 1 callersFunctionclearRequestLogs
(db: Env["DB"])
src/repo/logs.ts:51
↓ 1 callersFunctionclearSelectedAccounts
()
app/static/cache/cache.js:1168
↓ 1 callersFunctioncloseAddModal
()
app/static/token/token.js:543
↓ 1 callersFunctioncloseEditModal
()
app/static/token/token.js:655
↓ 1 callersFunctioncloseImportModal
()
app/static/token/token.js:785
↓ 1 callersMethodcompletions
Chat Completions 入口 Args: model: 模型名称 messages: 消息列表 stream: 是否流式 thinking:
app/services/grok/chat.py:448
↓ 1 callersMethodconsume
消耗配额(本地预估) Args: token_str: Token 字符串 effort: 消耗力度 Returns: 是否成功
app/services/token/manager.py:233
↓ 1 callersMethodconsume_daily_usage
Consume per-day quota for the given API key. incs keys: chat_used/heavy_used/image_used/video_used
app/services/api_keys.py:336
↓ 1 callersMethodconsume_heavy
消耗 heavy 配额(本地预估)。 当 heavy_quota 为 -1(未知)时,不扣减配额,仅记录一次使用。
app/services/token/models.py:127
↓ 1 callersMethodconvert_url
(self, token: str, url: str, response_format: str = "b64_json")
app/services/grok/imagine_experimental.py:288
↓ 1 callersFunctioncopyToClipboard
(text, btn)
app/static/config/config.js:365
↓ 1 callersMethodcount
统计资产数量(不保留明细)
app/services/grok/assets.py:429
↓ 1 callersMethodcount
Token 数量
app/services/token/pool.py:75
↓ 1 callersFunctioncreateAnthropicStreamFromChatStream
( source: ReadableStream<Uint8Array>, model: string, )
src/grok/compat.ts:328
↓ 1 callersFunctioncreateExperimentalImageEventStream
(args: { prompt: string; n: number; cookie: string; settings: Awaited<ReturnType<typeof getSettings>>[
src/routes/openai.ts:841
↓ 1 callersFunctioncreatePost
( fileUri: string, cookie: string, settings: GrokSettings, )
src/grok/create.ts:38
↓ 1 callersFunctioncreateResponsesStreamFromChatStream
( source: ReadableStream<Uint8Array>, model: string, )
src/grok/compat.ts:140
↓ 1 callersFunctioncreate_app
创建 FastAPI 应用
main.py:89
← previousnext →501–600 of 1,181, ranked by callers