feat: add configure.py — interactive initialization wizard#295
Merged
Conversation
lsdefine
reviewed
May 8, 2026
lsdefine
left a comment
Owner
There was a problem hiding this comment.
非常棒的贡献!交互式向导对新用户降低配置门槛很有价值,代码结构清晰、数据驱动设计很好,预计改完以下几点就能合并 👍
需要修改
1. 文件名 setup.py 与 setuptools 冲突
根目录的 setup.py 会被 pip/setuptools 误识别为包安装脚本(pip install . 会触发)。建议改名为 init_wizard.py 或 configure.py。
2. 飞书扫码段的异常类名不存在
lark.register_app() 没问题(已验证存在),但 lark.AppAccessDeniedError 和 lark.AppExpiredError 在 lark-oapi 包中不存在。如果触发这两个 except 分支会抛 AttributeError。建议改为捕获通用 Exception 或查阅 SDK 文档确认实际异常类名。
3. probe_models 的 urllib 请求无代理支持
国内用户直连 Anthropic/OpenRouter 大概率超时。建议支持读取环境变量 HTTP_PROXY/HTTPS_PROXY(可用 urllib.request.ProxyHandler),或加个代理参数。
建议改进(非阻塞)
ask_input的secret参数声明了但未实现,API Key 会明文回显。建议secret=True时用getpass.getpass()。- 平台 deps 声明了但流程中没有自动安装也没提示用户手动装,建议配置完成后输出一行
pip install xxx提示。
Contributor
Author
|
Review 反馈回复: 5 项反馈已全部处理:
另外改进:
PTAL |
… all feedback - Rename setup.py → configure.py to avoid pip/setuptools conflict - Fix lark exception: catch generic Exception instead of non-existent AppAccessDeniedError/AppExpiredError - Add proxy support to probe_models via HTTPS_PROXY/HTTP_PROXY env vars - Implement masked_input() with real-time API key masking - Add pip install hints for messaging platform dependencies - Add 2 new providers: CRS Gemini Ultra (Antigravity), Kimi/Moonshot OAI - Restructure main menu: LLM only / platform only / or both with cascade prompts - Add Python 3.14 compatibility warning and reconfiguration detection - Fix welcome_message: WeCom only, correct variable name - Show GETTING_STARTED example commands after configuration - Add advanced LLM options: proxy, context_win, stream, user_agent
FeiNiaoBF
pushed a commit
to FeiNiaoBF/GenericAgent
that referenced
this pull request
May 8, 2026
) * feat: add setup.py -- interactive initialization wizard * fix: address PR lsdefine#295 review — rename to configure.py, improve all feedback - Rename setup.py → configure.py to avoid pip/setuptools conflict - Fix lark exception: catch generic Exception instead of non-existent AppAccessDeniedError/AppExpiredError - Add proxy support to probe_models via HTTPS_PROXY/HTTP_PROXY env vars - Implement masked_input() with real-time API key masking - Add pip install hints for messaging platform dependencies - Add 2 new providers: CRS Gemini Ultra (Antigravity), Kimi/Moonshot OAI - Restructure main menu: LLM only / platform only / or both with cascade prompts - Add Python 3.14 compatibility warning and reconfiguration detection - Fix welcome_message: WeCom only, correct variable name - Show GETTING_STARTED example commands after configuration - Add advanced LLM options: proxy, context_win, stream, user_agent --------- Co-authored-by: guowenjiao54 <guowenjiao54@users.noreply.github.com>
FeiNiaoBF
pushed a commit
to FeiNiaoBF/GenericAgent
that referenced
this pull request
May 11, 2026
) * feat: add setup.py -- interactive initialization wizard * fix: address PR lsdefine#295 review — rename to configure.py, improve all feedback - Rename setup.py → configure.py to avoid pip/setuptools conflict - Fix lark exception: catch generic Exception instead of non-existent AppAccessDeniedError/AppExpiredError - Add proxy support to probe_models via HTTPS_PROXY/HTTP_PROXY env vars - Implement masked_input() with real-time API key masking - Add pip install hints for messaging platform dependencies - Add 2 new providers: CRS Gemini Ultra (Antigravity), Kimi/Moonshot OAI - Restructure main menu: LLM only / platform only / or both with cascade prompts - Add Python 3.14 compatibility warning and reconfiguration detection - Fix welcome_message: WeCom only, correct variable name - Show GETTING_STARTED example commands after configuration - Add advanced LLM options: proxy, context_win, stream, user_agent --------- Co-authored-by: guowenjiao54 <guowenjiao54@users.noreply.github.com>
bendusy
pushed a commit
to bendusy/GenericAgent
that referenced
this pull request
May 14, 2026
) * feat: add setup.py -- interactive initialization wizard * fix: address PR lsdefine#295 review — rename to configure.py, improve all feedback - Rename setup.py → configure.py to avoid pip/setuptools conflict - Fix lark exception: catch generic Exception instead of non-existent AppAccessDeniedError/AppExpiredError - Add proxy support to probe_models via HTTPS_PROXY/HTTP_PROXY env vars - Implement masked_input() with real-time API key masking - Add pip install hints for messaging platform dependencies - Add 2 new providers: CRS Gemini Ultra (Antigravity), Kimi/Moonshot OAI - Restructure main menu: LLM only / platform only / or both with cascade prompts - Add Python 3.14 compatibility warning and reconfiguration detection - Fix welcome_message: WeCom only, correct variable name - Show GETTING_STARTED example commands after configuration - Add advanced LLM options: proxy, context_win, stream, user_agent --------- Co-authored-by: guowenjiao54 <guowenjiao54@users.noreply.github.com>
RocketLi
pushed a commit
to RocketLi/GenericAgent
that referenced
this pull request
May 18, 2026
) * feat: add setup.py -- interactive initialization wizard * fix: address PR lsdefine#295 review — rename to configure.py, improve all feedback - Rename setup.py → configure.py to avoid pip/setuptools conflict - Fix lark exception: catch generic Exception instead of non-existent AppAccessDeniedError/AppExpiredError - Add proxy support to probe_models via HTTPS_PROXY/HTTP_PROXY env vars - Implement masked_input() with real-time API key masking - Add pip install hints for messaging platform dependencies - Add 2 new providers: CRS Gemini Ultra (Antigravity), Kimi/Moonshot OAI - Restructure main menu: LLM only / platform only / or both with cascade prompts - Add Python 3.14 compatibility warning and reconfiguration detection - Fix welcome_message: WeCom only, correct variable name - Show GETTING_STARTED example commands after configuration - Add advanced LLM options: proxy, context_win, stream, user_agent --------- Co-authored-by: guowenjiao54 <guowenjiao54@users.noreply.github.com>
lsdefine
pushed a commit
that referenced
this pull request
Jul 23, 2026
* feat: add setup.py -- interactive initialization wizard * fix: address PR #295 review — rename to configure.py, improve all feedback - Rename setup.py → configure.py to avoid pip/setuptools conflict - Fix lark exception: catch generic Exception instead of non-existent AppAccessDeniedError/AppExpiredError - Add proxy support to probe_models via HTTPS_PROXY/HTTP_PROXY env vars - Implement masked_input() with real-time API key masking - Add pip install hints for messaging platform dependencies - Add 2 new providers: CRS Gemini Ultra (Antigravity), Kimi/Moonshot OAI - Restructure main menu: LLM only / platform only / or both with cascade prompts - Add Python 3.14 compatibility warning and reconfiguration detection - Fix welcome_message: WeCom only, correct variable name - Show GETTING_STARTED example commands after configuration - Add advanced LLM options: proxy, context_win, stream, user_agent --------- Co-authored-by: guowenjiao54 <guowenjiao54@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
为 GenericAgent 新增
configure.py,提供交互式初始化配置,替代手动编辑mykey.py的流程。本 PR 提供一个终端交互式向导,覆盖:
mykey.py— 备份旧配置,模板字段按mykey_template.py精确对齐文件变更
文件名从
setup.py改为configure.py,避免与 pip/setuptools 冲突。交互流程
sk-302a****6d6d)→ 自动探测可用模型 → 可选第二个模型做故障转移 → 高级选项mykey.py,输出启动命令 + pip 依赖提示 + GETTING_STARTED 入门示例Review 反馈处理
configure.pylark.AppAccessDeniedError/lark.AppExpiredError不存在except Exceptionprobe_models无代理支持_get_proxy_handler(),读取HTTPS_PROXY/HTTP_PROXYsecret参数未实现masked_input(),输入时实时显示脱敏版本pip install xxx