Commit b35cd810 authored by shiyu's avatar shiyu

ai对话接口修改

parent f87a2b9f
...@@ -124,8 +124,8 @@ public class ImServiceImpl implements IMService { ...@@ -124,8 +124,8 @@ public class ImServiceImpl implements IMService {
logger.info("=========== userid:{}, 提问ai的消息发送成功 ==========", dto.getFromAccount()); logger.info("=========== userid:{}, 提问ai的消息发送成功 ==========", dto.getFromAccount());
if (dto.getMsgType() == IMEnum.MsgTypeEnum.TIMTextElem.getCode()) { if (dto.getMsgType() == IMEnum.MsgTypeEnum.TIMTextElem.getCode()) {
String question = (String) dto.getMsgContent(); String question = (String) dto.getMsgContent();
String response = chatApi.chatWithModel(question); String answer = chatApi.chatWithModel(question);
String answer = JsonUtils.getValueByPath(response, "response"); // String answer = JsonUtils.getValueByPath(response, "response");
//将回答也发送给IM //将回答也发送给IM
SendChatMsgRequestDto answerDto = new SendChatMsgRequestDto(); SendChatMsgRequestDto answerDto = new SendChatMsgRequestDto();
......
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