Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/su-kaka/gcli2api
/ functions
Functions
693 in github.com/su-kaka/gcli2api
⨍
Functions
693
◇
Types & classes
71
↳
Endpoints
49
↓ 1 callers
Function
test_anti_truncation_stream_request
测试流式抗截断请求
src/router/geminicli/gemini.py:608
↓ 1 callers
Function
test_fake_stream_request
测试假流式请求
src/router/antigravity/gemini.py:556
↓ 1 callers
Function
test_fake_stream_request
测试假流式请求
src/router/antigravity/openai.py:513
↓ 1 callers
Function
test_fake_stream_request
测试假流式请求
src/router/antigravity/anthropic.py:539
↓ 1 callers
Function
test_fake_stream_request
测试假流式请求
src/router/geminicli/gemini.py:554
↓ 1 callers
Function
test_fake_stream_request
测试假流式请求
src/router/geminicli/openai.py:513
↓ 1 callers
Function
test_fake_stream_request
测试假流式请求
src/router/geminicli/anthropic.py:539
↓ 1 callers
Function
test_non_stream_request
测试非流式请求
src/api/geminicli.py:760
↓ 1 callers
Function
test_non_stream_request
测试非流式请求
src/router/antigravity/gemini.py:470
↓ 1 callers
Function
test_non_stream_request
测试非流式请求
src/router/antigravity/openai.py:423
↓ 1 callers
Function
test_non_stream_request
测试非流式请求
src/router/antigravity/anthropic.py:449
↓ 1 callers
Function
test_non_stream_request
测试非流式请求
src/router/geminicli/gemini.py:468
↓ 1 callers
Function
test_non_stream_request
测试非流式请求
src/router/geminicli/openai.py:423
↓ 1 callers
Function
test_non_stream_request
测试非流式请求
src/router/geminicli/anthropic.py:449
↓ 1 callers
Function
test_stream_request
测试流式请求
src/api/geminicli.py:717
↓ 1 callers
Function
test_stream_request
测试流式请求
src/router/antigravity/gemini.py:502
↓ 1 callers
Function
test_stream_request
测试流式请求
src/router/antigravity/openai.py:455
↓ 1 callers
Function
test_stream_request
测试流式请求
src/router/antigravity/anthropic.py:481
↓ 1 callers
Function
test_stream_request
测试流式请求
src/router/geminicli/gemini.py:500
↓ 1 callers
Function
test_stream_request
测试流式请求
src/router/geminicli/openai.py:455
↓ 1 callers
Function
test_stream_request
测试流式请求
src/router/geminicli/anthropic.py:481
↓ 1 callers
Function
updateCooldownDisplays
()
front/common.js:3036
↓ 1 callers
Function
upload_credentials_common
批量上传凭证文件的通用函数
src/panel/creds.py:105
↓ 1 callers
Function
verify_credential_project_common
验证并重新获取凭证的project id的通用函数
src/panel/creds.py:532
↓ 1 callers
Function
verify_password
验证密码(面板登录使用)
src/auth.py:1046
↓ 1 callers
Function
wait_for_callback_sync
同步等待OAuth回调完成,使用对应流程的专用服务器
src/auth.py:341
Method
__call__
(self, level: str, message: str)
log.py:268
Method
__enter__
(self)
src/auth.py:99
Method
__exit__
(self, exc_type, exc_val, exc_tb)
src/auth.py:111
Method
__getattr__
代理所有方法调用到真实的 CredentialManager 实例
src/credential_manager.py:499
Method
__init__
(self)
src/keeplive.py:18
Method
__init__
(self)
src/auth.py:94
Method
__init__
( self, access_token: str, refresh_token: str = None, client_id: str = None,
src/google_oauth_api.py:33
Method
__init__
( self, client_id: str, client_secret: str, scopes: List[str], redirect_uri: str = None )
src/google_oauth_api.py:173
Method
__init__
( self, email: str, private_key: str, project_id: str = None, scopes: List[str] = None )
src/google_oauth_api.py:252
Method
__init__
(self)
src/storage_adapter.py:78
Method
__init__
(self)
src/credential_manager.py:21
Method
__init__
(self)
src/credential_manager.py:485
Method
__init__
(self)
src/task_manager.py:25
Method
__init__
(self, max_connections: int = 3)
src/panel/utils.py:23
Method
__init__
(self)
src/storage/sqlite_manager.py:64
Method
__init__
(self)
src/storage/psql_manager.py:32
Method
__init__
(self)
src/storage/mongodb_manager.py:45
Method
__init__
( self, original_request_func, payload: Dict[str, Any], max_attempts: int = 3,
src/converter/anti_truncation.py:187
Method
__new__
(cls)
src/task_manager.py:19
Method
_async_wrapper
(*args, **kwargs)
src/credential_manager.py:501
Function
_build_message_with_reasoning
构建包含可选推理内容的消息对象
src/converter/openai2gemini.py:64
Function
_clean_schema_for_claude
清理 JSON Schema,转换为 Claude API 支持的格式(符合 JSON Schema draft 2020-12) 处理逻辑: 1. 解析 $ref 引用 2. 合并 allOf 中的 schema 3. 转换 anyOf 为更兼容的格式
src/converter/openai2gemini.py:197
Function
_log_writer_worker
()
log.py:119
Method
_rk_config
配置项的 Redis key
src/storage/mongodb_manager.py:1195
Function
action
(filename, action)
front/common.js:291
Function
addFiles
(files)
front/common.js:386
Function
applyAntigravityStatusFilter
()
front/common.js:1459
Function
applyStatusFilter
()
front/common.js:239
Function
apply_anti_truncation_to_stream
对流式请求应用反截断处理 Args: request_func: 原始请求函数 payload: 请求payload max_attempts: 最大续传尝试次数 enable_prefill_mode: 是否启用预
src/converter/anti_truncation.py:686
Function
auth_callback
处理认证回调,支持自动检测项目ID
src/panel/auth.py:80
Function
auth_callback_url
从回调URL直接完成认证
src/panel/auth.py:132
Function
authenticate_flexible
统一的灵活认证函数,支持多种认证方式 此函数可以直接用作 FastAPI 的 Depends 依赖 支持的认证方式: - URL 参数: key - HTTP 头部: Authorization (Bearer token)
src/utils.py:151
Function
autoSetKeepaliveUrl
()
front/common.js:3222
Function
batchAction
(action)
front/common.js:313
Function
batchAntigravityAction
(action)
front/common.js:1482
Function
batchConfigurePreview
()
front/common.js:2267
Function
batchVerifyAntigravityProjectIds
()
front/common.js:2189
Function
batchVerifyProjectIds
()
front/common.js:2111
Function
calculateStats
()
front/common.js:163
Function
changeAntigravityPage
(direction)
front/common.js:1460
Function
changeAntigravityPageSize
()
front/common.js:1461
Function
changePage
(direction)
front/common.js:223
Function
changePageSize
()
front/common.js:232
Function
chat_completions
处理OpenAI格式的聊天完成请求(流式和非流式) Args: openai_request: OpenAI格式的请求体 token: Bearer认证令牌
src/router/antigravity/openai.py:64
Function
chat_completions
处理 OpenAI 格式的聊天完成请求(流式和非流式),底层通过匿名 Vertex AI 端点。
src/router/vertex/openai.py:26
Function
chat_completions
处理OpenAI格式的聊天完成请求(流式和非流式) Args: openai_request: OpenAI格式的请求体 token: Bearer认证令牌
src/router/geminicli/openai.py:64
Function
checkForUpdates
()
front/common.js:3117
Function
check_auth_status
检查认证状态
src/panel/auth.py:181
Function
cleanup_auth_flows_for_memory
清理认证流程以释放内存
src/auth.py:122
Function
clearAntigravityFiles
()
front/common.js:1534
Function
clearEnvCredentials
()
front/common.js:2674
Function
clearFiles
()
front/common.js:442
Function
clearLogs
()
front/common.js:2561
Method
clear_all_model_cooldowns
清除某个凭证的所有模型冷却时间
src/storage/sqlite_manager.py:1290
Method
clear_all_model_cooldowns
清除某个凭证的所有模型冷却时间 Args: filename: 凭证文件名 mode: 凭证模式 ("geminicli" 或 "antigravity") Returns:
src/storage/mongodb_manager.py:1438
Function
clear_logs
清空日志文件
src/panel/logs.py:27
Method
close
关闭存储适配器
src/storage_adapter.py:149
Method
close
清理资源
src/credential_manager.py:43
Method
close
关闭数据库连接
src/storage/sqlite_manager.py:354
Method
close
关闭 MongoDB 连接
src/storage/mongodb_manager.py:470
Function
close_storage_adapter
关闭全局存储适配器
src/storage_adapter.py:337
Function
complete_auth_flow
完成认证流程并保存凭证,支持自动检测项目ID
src/auth.py:369
Function
configurePreviewChannel
(filename)
front/common.js:1774
Function
configure_preview_channel
为 geminicli 凭证配置 preview 通道 通过调用 Google Cloud API 设置 release_channel 为 EXPERIMENTAL Args: filename: 凭证文件名 mode: 凭证模式(仅支
src/panel/creds.py:1223
Function
convert_tool_message_to_function_response
将 OpenAI 的 tool role 消息转换为 Gemini functionResponse Args: message: OpenAI 格式的工具消息 all_messages: 所有消息的列表,用于查找 tool_call_id 对应的
src/converter/openai2gemini.py:935
Function
count_tokens
模拟Gemini格式的token计数 使用简单的启发式方法:大约4字符=1token
src/router/antigravity/gemini.py:392
Function
count_tokens
处理Anthropic格式的token计数请求 Args: request: FastAPI请求对象 _token: Bearer认证令牌(由Depends验证) Returns: JSONResponse
src/router/antigravity/anthropic.py:345
Function
count_tokens
模拟 token 计数(启发式估算)。
src/router/vertex/gemini.py:87
Function
count_tokens
模拟Gemini格式的token计数 使用简单的启发式方法:大约4字符=1token
src/router/geminicli/gemini.py:390
Function
count_tokens
处理Anthropic格式的token计数请求 Args: request: FastAPI请求对象 _token: Bearer认证令牌(由Depends验证) Returns: JSONResponse
src/router/geminicli/anthropic.py:345
Function
create_anthropic_heartbeat_chunk
创建 Anthropic 格式的心跳块(用于假流式) Returns: 心跳响应块字典
src/converter/fake_stream.py:344
Function
create_gemini_heartbeat_chunk
创建 Gemini 格式的心跳数据块 Returns: 心跳数据块
src/converter/fake_stream.py:231
Function
create_managed_task
创建一个被管理的异步任务的便捷函数
src/task_manager.py:131
Function
create_openai_heartbeat_chunk
创建 OpenAI 格式的心跳块(用于假流式) Returns: 心跳响应块字典
src/converter/fake_stream.py:145
← previous
next →
401–500 of 693, ranked by callers