diff --git a/src/api/http_api.py b/src/api/http_api.py new file mode 100644 index 000000000..a10c2251a --- /dev/null +++ b/src/api/http_api.py @@ -0,0 +1,22 @@ +from fastapi import FastAPI +from pathlib import Path +from pydantic import BaseModel + +STATIC_PATH = Path(__file__).parent.absolute() / 'static' + +app = FastAPI( + title='Phi-3 Language Model API', + description='HTTP API for interacting with Phi-3 Mini 4K language model' +) + +class Prompt(BaseModel): + prompt: str + +class Response(BaseModel): + response: str + + +@app.get('/', response_model=Response) +async def health_check(): + return ({ 'response': 'success' }) +