JuanMa360 commited on
Commit
fcd4711
·
1 Parent(s): 22dc958

bugfix: params

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -8,23 +8,20 @@ def respond(message, property_id: str = "a0de88a24c4e844d86f285d6abbd59d0"):
8
  url = "https://data-monopolio.dev.dd360.mx/ai-assistant/v1"
9
 
10
  payload = json.dumps({
11
- "query": message,
12
- "sessionId": "12345",
13
- "numMessages": 4,
14
- "userId": "user-01",
15
- "property_id": property_id
16
  })
17
-
18
  headers = {
19
- 'Content-Type': 'application/json'
20
  }
21
 
22
- response = requests.post(url, headers=headers, data=payload)
23
 
24
- response.raise_for_status()
25
 
26
  return response.text
27
-
28
  except requests.RequestException as e:
29
  return f"Error: {str(e)}"
30
 
 
8
  url = "https://data-monopolio.dev.dd360.mx/ai-assistant/v1"
9
 
10
  payload = json.dumps({
11
+ "query": "cuantos cuartos tiene la propiedad?",
12
+ "sessionId": "12345",
13
+ "numMessages": 4,
14
+ "userId": "user-01",
15
+ "property_id": "a0de88a24c4e844d86f285d6abbd59d0"
16
  })
 
17
  headers = {
18
+ 'Content-Type': 'application/json'
19
  }
20
 
21
+ response = requests.request("POST", url, headers=headers, data=payload)
22
 
 
23
 
24
  return response.text
 
25
  except requests.RequestException as e:
26
  return f"Error: {str(e)}"
27