|
|
@ -134,6 +134,7 @@ public class QandaPorcess implements Runnable { |
|
|
|
log.info("数据流转至下游-------"); |
|
|
|
} catch (Throwable e) { |
|
|
|
log.error("问答处理异常,", e); |
|
|
|
log.error("异常任务:{}",JSONObject.toJSONString(task)); |
|
|
|
//结果集 |
|
|
|
Map<String, Object> results = new HashMap<String, Object>(16); |
|
|
|
Map<String, Object> result = new HashMap<String, Object>(16); |
|
|
@ -171,7 +172,7 @@ public class QandaPorcess implements Runnable { |
|
|
|
chatContent.append(map.get(Constants.VALUE)); |
|
|
|
} else { |
|
|
|
String jsonPath = (String) map.get(Constants.VALUE); |
|
|
|
chatContent.append(DataUtil.getValue(jsonPath, data).toString()); |
|
|
|
chatContent.append(DataUtil.getValue(jsonPath, data)); |
|
|
|
} |
|
|
|
} |
|
|
|
Map<String, Object> headers = new HashMap<String, Object>(16); |
|
|
@ -182,6 +183,10 @@ public class QandaPorcess implements Runnable { |
|
|
|
params.put(Constants.MESSAGES, prompts); |
|
|
|
params.put(Constants.TEMPERATURE, temperature); |
|
|
|
params.put(Constants.TOP_P, topP); |
|
|
|
//推理字段 enabled 启用,disabled禁用 |
|
|
|
Map<String, Object> thinking = new HashMap<String, Object>(); |
|
|
|
thinking.put(Constants.TYPE, "disabled"); |
|
|
|
params.put(Constants.THINKING, thinking); |
|
|
|
headers.put(Constants.AUTHORIZATION, authorization); |
|
|
|
headers.put("Content-Type", "application/json"); |
|
|
|
String html = DownLoadUtil.doPost(Constants.DOUBAO_TURBO_URL, JSONObject.toJSONString(params), headers); |
|
|
|