d07d5ac df40774 d07d5ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from fastapi import FastAPI from qnabot import QnABot def create_app(bot: QnABot): app = FastAPI() @app.get("/v1/ask/{question}") async def ask(question: str): answer = bot.ask(question) return {"answer": answer} return app