Spaces:
Sleeping
Sleeping
Download runtime/service.py from G-ACE/astera-customerAI: direct link, hf CLI and curl.
- Browser
- Download file 473 Bytes
-
https://huggingface.co/spaces/G-ACE/astera-customerAI/resolve/main/runtime/service.py
- Command line
-
hf download hf://spaces/G-ACE/astera-customerAI/runtime/service.py
-
curl -L -o service.py https://huggingface.co/spaces/G-ACE/astera-customerAI/resolve/main/runtime/service.py
473 Bytes
| from __future__ import annotations | |
| from .schemas import FinalResponse | |
| class CustomerAIWork: | |
| """Public service boundary. Runtime ownership lives in CustomerAIInternalCore.""" | |
| def __init__(self, core): | |
| self.core = core | |
| async def run(self, session_id: str, message: str) -> FinalResponse: | |
| return await self.core.run(session_id, message) | |
| def delete_session(self, session_id: str) -> bool: | |
| return self.core.state.delete(session_id) | |