diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/district/FangjiaClientUtils.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/district/FangjiaClientUtils.groovy index fd1066677..f7b23f7f6 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/district/FangjiaClientUtils.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/district/FangjiaClientUtils.groovy @@ -2,6 +2,9 @@ package com.fangjia.script.gj.district import com.fangjia.core.util.HttpRequest import com.fangjia.script.temp.shenjian.util.HttpUtils +import com.fangjia.script.util.DateUtils +import com.fangjia.script.yinjihaun.util.HttpClient +import com.mongodb.BasicDBObject import net.sf.json.JSONArray import net.sf.json.JSONObject @@ -401,7 +404,7 @@ class FangjiaClientUtils { def content = null def points = [] try { - def url = "http://192.168.0.19:31080/FangJiaNlpService/convert?locations="+URLEncoder.encode(locationstr,"UTF-8")+"&coordsys=${type}" + def url = "http://didata-uat-server.fangjia.com/FangJiaNlpService/convert?locations="+URLEncoder.encode(locationstr,"UTF-8")+"&coordsys=${type}" content = new HttpRequest().newGet(url, null, "utf-8") jsonObj = JSONObject.fromObject(content) @@ -419,4 +422,26 @@ class FangjiaClientUtils { return null; } + static def aiResult(content){ + def headers = [:] + headers.put("accept", "application/json") + headers.put("Content-Type", "application/json") + + def url = "http://didata-cloud-server.fangjia.com/chat/deepseek" + try { + Map params = new HashMap(); + params.put("content", content); + + String result = HttpClient.post(url, params, headers, "utf-8", true) + println result + if (result) { + def json = JSONObject.fromObject(result) + return json + } + } catch (Exception e) { + println e.getMessage() + } + return null + } + }