Commit Graph
3 Commits
Author SHA1 Message Date
Xin WangandClaude Opus 4.8 07f30af105 feat: support base64 and upload image input modes in chat
Add a unified way to send images in chat: inline base64 data URLs
(passed through natively) or auto-upload via image_input_mode="upload",
which replaces inline data URLs with hosted URLs using upload_chat_image.

- New fastgpt_client/images.py with content-part / data-URL helpers
- image_input_mode + appId/outLinkAuthData params on create_chat_completion
  (sync and async); upload failures fall back to inline base64
- Tests covering helpers, both modes, validation, and fallback

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:50:37 +08:00
Xin Wang 4e980a3dd0 Merge branch 'master' of https://gitea.xiaowang.eu.org/wx44wx/fastgpt-python-sdk 2026-06-01 13:40:16 +08:00
Xin Wang 96d685da91 Add chat image upload support 2026-06-01 13:39:22 +08:00