Commit cfafd41d authored by 陈立彬's avatar 陈立彬

Merge branch 'feature/20241217_收尾' into sandbox

parents 9579f9f5 5a88e27e
......@@ -575,11 +575,11 @@ public class AppChatCompletionService {
reqBody.put("session_id", sessionId);
// JSONObject customVariables = new JSONObject();
// customVariables.put("Position", userPrincipal.getPosition());
// customVariables.put("Department", userPrincipal.getShopName());
// customVariables.put("UserId", userPrincipal.getUserId());
// reqBody.put("custom_variables", customVariables.toJSONString());
JSONObject customVariables = new JSONObject();
customVariables.put("Position", userPrincipal.getPosition());
customVariables.put("Department", userPrincipal.getShopName());
customVariables.put("UserId", userPrincipal.getUserId());
reqBody.put("custom_variables", customVariables);
final String[] thoughtContent = {""};
final String[] replyContent = {""};
......@@ -590,6 +590,7 @@ public class AppChatCompletionService {
.mapNotNull(v -> {
JSONObject json = JSONObject.parseObject(v);
System.out.println(v);
String type = json.getString("type");
if(Objects.equals(type, "error")) {
thoughtContent[0] = json.getJSONObject("error").getString("message");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment