Repository navigation
feat(python): add Windows-friendly Codex chat with image support - #115
Open
lfu45757-star wants to merge 1 commit into
Open
lfu45757-star wants to merge 1 commit into
lfu45757-star wants to merge 1 commit into
Conversation
Add owner-only text/image chat, latest-image follow-ups, reset and image lifecycle handling. Bound SDK media downloads without changing defaults, and include offline tests, CI coverage and public setup documentation. Complementary to corespeed-io#110.
This branch has not been deployed
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.
Summary
Add an optional, Windows-friendly Python bridge for chatting with a locally
authenticated Codex CLI, including single-image understanding and follow-up
questions about the most recent image.
Relationship to #110
Related to #110, but independent and complementary rather than a replacement:
This PR does not modify the skill/Node.js files proposed in #110 or change the
existing default echo example. It is based on the current upstream
main, notthe older source archive used for local deployment.
Changes
python/examples/codex_bot.py,codex_images.pyandstart-codex.cmd.preserve ordinary text conversation with bounded history.
codex exec --image; support mixed image/textmessages and separate follow-up messages. New images replace old ones.
/resetclears both text and image context; image expiry and normal exit alsorelease cached image data. No arbitrary files, multi-image comparisons, voice,
video or remote computer-operation tools are enabled.
metadata removal, and resize to a 2048-pixel maximum edge. Original decrypted
images stay off disk; normalized temporary JPEGs are removed after each call,
including error, timeout and cancellation paths.
download_raw(..., max_bytes=None)to the Python SDK.When set, limit both the encrypted stream (with AES padding allowance) and
decrypted bytes, including when
Content-Lengthis absent.regression tests and Python CI dependency/CLI-help coverage.
.venv/and.codex-wechat/. No credentials, real user messages/images,machine-specific deployment paths, installed environments or runtime records
are included.
Validation
integration: 73 tests passed, plus 15 parameter subtests.
python examples/codex_bot.py --help: passed without logging into WeChat.git diff --check: passed.desktop-bundled Codex CLI
0.162.0-alpha.17.2: text returnedCODEX_OK, and imageinput correctly read a synthetic image containing six random digits not present
in the text prompt. Those CLI invocations did not connect to WeChat or send
WeChat test messages.
macOS and Linux. These new remote CI runs have not been claimed as passing yet.
Limitations
model. Required CLI flags and the locally tested version are documented; it
does not add another API key or make model calls in CI.
Chinese quick reference.
expiry. Separate messages receive separate replies, not delayed batching.
is processed after the call finishes or times out (default 180 seconds).
delete content already submitted to Codex/OpenAI.
no running local WeChat service was interrupted for this contribution.
中文摘要
补充 #110 尚未覆盖的 Windows/Python 图文聊天用法:单图识别、最近图片追问、
/reset同时清空文字与图片,以及图片下载限额、格式校验和临时文件清理。这是关闭电脑操作工具的聊天示例,不替代 #110 的任务执行和会话续接方案。