|
@@ -121,16 +121,12 @@ def create_chat(msg,type):
|
|
|
landType = json_res["landType"]
|
|
|
poi = json_res["poi"]
|
|
|
|
|
|
- if poi == "":
|
|
|
-
|
|
|
- if landType in land and districtName in addtress:
|
|
|
- json_res = jsonResToDict(json_res)
|
|
|
-
|
|
|
- else:
|
|
|
- json_res = prompt
|
|
|
- json_res = res_error(json_res, "selectLand","error")
|
|
|
+
|
|
|
+
|
|
|
+ if landType in land and districtName in addtress:
|
|
|
+ json_res = jsonResToDict(json_res,poi)
|
|
|
+
|
|
|
else:
|
|
|
-
|
|
|
json_res = prompt
|
|
|
json_res = res_error(json_res, "selectLand","error")
|
|
|
except:
|
|
@@ -180,8 +176,16 @@ def update_chat_history(user_message):
|
|
|
|
|
|
|
|
|
|
|
|
-def jsonResToDict(json_res):
|
|
|
+def jsonResToDict(json_res,poi):
|
|
|
+
|
|
|
+ if poi == "":
|
|
|
+ print("位置点为空,利用行政区划选址")
|
|
|
+
|
|
|
|
|
|
+
|
|
|
+ else:
|
|
|
+ print("位置点不为空,利用位置点选址")
|
|
|
+[]
|
|
|
|
|
|
districtName = json_res["districtName"]
|
|
|
ewkt = getAiDistrict(districtName)
|