修改json包

This commit is contained in:
zren25
2025-03-06 13:52:23 +08:00
parent 1eb5162beb
commit 866574a4fe

View File

@@ -1,9 +1,9 @@
package com.volvo.ai.analytic.center.service.impl;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import okhttp3.*;
import org.springframework.boot.configurationprocessor.json.JSONException;
import org.springframework.boot.configurationprocessor.json.JSONObject;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.stereotype.Service;
@@ -54,7 +54,7 @@ public class DeepSeekServiceImpl {
String responseBodyString = response.body().string();
System.out.println("模型出参:" + responseBodyString);
JSONObject jsonObject = new JSONObject(responseBodyString);
JSONObject jsonObject = JSONObject.parseObject(responseBodyString);
String split = jsonObject.getJSONArray("choices")
.getJSONObject(0)
.getJSONObject("message")