|
@@ -26,7 +26,7 @@ from qwen_agent.planning.plan_continue_executor import PlanContinueExecutor
|
|
|
from qwen_agent.llm.llm_client import LLMClient, LLMAsyncClient
|
|
|
from agent_config import LLMDict_Qwen_72B_1211, LLMDict_GPT4_TURBO
|
|
|
from agent_messages import BaseRequest
|
|
|
-from qwen_agent.tools.tools import async_xzdb
|
|
|
+from qwen_agent.tools.tools import async_xzdb,async_db
|
|
|
from qwen_agent.tools.gis.spatial_analysis.geo_analysis import intersect_kfq, intersect_gyyd
|
|
|
|
|
|
prompt_lan = "CN"
|
|
@@ -179,7 +179,7 @@ async def clarificationByTurbo(request: BaseRequest):
|
|
|
@app.get("/kgQuery")
|
|
|
async def kgQuery(id: str):
|
|
|
sql = f'select objectid, xzqmc, xzqdm, dymc, yddm, ydxz, ydmj, rjlsx, rjlxx, jzmdsx, jzmdxx, jzgdsx, jzgdxx, ldlsx, ldlxx, pfwh, pfsj, st_area(shape::geography) as pfmarea,st_astext(shape) as geom, st_astext(st_centroid(shape)) as center_wkt from sde.kzxxxgh where objectid in ({id})'
|
|
|
- res_tuples = await async_xzdb.run(sql)
|
|
|
+ res_tuples = await async_db.run(sql)
|
|
|
result, success = res_tuples
|
|
|
print(success, result)
|
|
|
return json.loads(result)
|
|
@@ -188,7 +188,7 @@ async def kgQuery(id: str):
|
|
|
@app.get("/klyzyQuery")
|
|
|
async def klyzyQuery(id: str):
|
|
|
sql = f'select *, st_astext(shape) as geom, st_astext(st_centroid(shape)) as center_wkt from sde.ecgap_klyzy where id in ({id})'
|
|
|
- res_tuples = await async_xzdb.run(sql)
|
|
|
+ res_tuples = await async_db.run(sql)
|
|
|
result, success = res_tuples
|
|
|
print(success, result)
|
|
|
return json.loads(result)
|