Spaces:
Build error
Build error
Download src/domain/interfaces.py from fariasultanacodes/gemini-agent: direct link, hf CLI and curl.
- Browser
- Download file 1.29 kB
-
https://huggingface.co/spaces/fariasultanacodes/gemini-agent/resolve/main/src/domain/interfaces.py
- Command line
-
hf download hf://spaces/fariasultanacodes/gemini-agent/src/domain/interfaces.py
-
curl -L -o interfaces.py https://huggingface.co/spaces/fariasultanacodes/gemini-agent/resolve/main/src/domain/interfaces.py
1.29 kB
| from abc import ABC, abstractmethod | |
| from typing import List, Dict, Any, AsyncGenerator | |
| from src.domain.models import Session, Message, SessionStatus | |
| class AgentRepository(ABC): | |
| async def chat(self, session: Session, message: Message) -> AsyncGenerator[Dict[str, Any], None]: | |
| """Send a message to the agent and get a stream of events""" | |
| pass | |
| class SandboxService(ABC): | |
| async def execute_shell(self, session_id: str, command: str) -> str: | |
| pass | |
| async def read_file(self, session_id: str, path: str) -> str: | |
| pass | |
| async def start_session(self, session_id: str) -> None: | |
| pass | |
| async def stop_session(self, session_id: str) -> None: | |
| pass | |
| class SessionRepository(ABC): | |
| async def create_session(self) -> Session: | |
| pass | |
| async def get_session(self, session_id: str) -> Session: | |
| pass | |
| async def list_sessions(self) -> List[Session]: | |
| pass | |
| async def delete_session(self, session_id: str) -> None: | |
| pass | |
| async def update_session(self, session: Session) -> None: | |
| pass | |