suneeln-duke commited on
Commit
bef6b74
·
1 Parent(s): 12826af

Added ask api route

Browse files
Files changed (1) hide show
  1. main.py +7 -0
main.py CHANGED
@@ -40,3 +40,10 @@ documents = loader.load()
40
  @app.get("/hello")
41
  def hello():
42
  return {"message": "Hello World"}
 
 
 
 
 
 
 
 
40
  @app.get("/hello")
41
  def hello():
42
  return {"message": "Hello World"}
43
+
44
+ @app.get("/ask")
45
+ def ask(question: str):
46
+ question_category = eval(master_agent.answer_question(master, question))
47
+
48
+
49
+ return {"category": question_category}