vocode-python/vocode/user_implemented_agent/base_agent.py
2023-03-02 13:15:36 -08:00

13 lines
No EOL
316 B
Python

from fastapi import FastAPI, APIRouter
import uvicorn
class BaseAgent():
def __init__(self):
self.app = FastAPI()
async def respond(self, human_input) -> str:
raise NotImplementedError
def run(self, host="localhost", port=3000):
uvicorn.run(self.app, host=host, port=port)