Phase 17: Add image upload to chat UI

- app.py: image_input gr.Image component, respond() accepts image_path,
  all yields updated to 7 outputs
- api_client.py: chat(image_path=None), base64-encodes image for API
- services/chat.py: chat(image_path=None) passes through to api_client

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
sal
2026-06-02 13:52:21 +09:00
parent 974bab7cd8
commit 7f50333bdb
3 changed files with 57 additions and 38 deletions
+6 -2
View File
@@ -8,9 +8,13 @@ class ChatService:
self._api = api_client
def chat(
self, message: str, user_id: str, show_thinking: bool
self,
message: str,
user_id: str,
show_thinking: bool,
image_path: str | None = None,
) -> AsyncIterator[tuple[str, str | None]]:
return self._api.chat(message, user_id, show_thinking)
return self._api.chat(message, user_id, show_thinking, image_path=image_path)
async def reset(self, user_id: str) -> None:
await self._api.reset(user_id)