zoya23 commited on
Commit
ee854ee
·
verified ·
1 Parent(s): 045a7e1

Update orchestrator/orchestrator.py

Browse files
Files changed (1) hide show
  1. orchestrator/orchestrator.py +0 -3
orchestrator/orchestrator.py CHANGED
@@ -10,13 +10,10 @@ class Query(BaseModel):
10
 
11
  @app.post("/ask")
12
  def ask(query: Query):
13
- # Step 1: Get market data
14
  market_data = requests.post("http://localhost:8001/market", json={"query": query}).json()
15
 
16
- # Step 2: Get earnings summary
17
  earnings = requests.post("http://localhost:8002/earnings", json={"query": query}).json()
18
 
19
- # Step 3: Compose final answer
20
  answer = f"Today, your Asia tech allocation is {market_data['allocation']}% of AUM. " \
21
  f"{earnings['summary']}"
22
  return {"response": answer}
 
10
 
11
  @app.post("/ask")
12
  def ask(query: Query):
 
13
  market_data = requests.post("http://localhost:8001/market", json={"query": query}).json()
14
 
 
15
  earnings = requests.post("http://localhost:8002/earnings", json={"query": query}).json()
16
 
 
17
  answer = f"Today, your Asia tech allocation is {market_data['allocation']}% of AUM. " \
18
  f"{earnings['summary']}"
19
  return {"response": answer}