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:
+6
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user