mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
(improvement)(headless) Reduce the two calls to the mapper in the parser stage. (#888)
This commit is contained in:
@@ -4,6 +4,9 @@ import com.tencent.supersonic.chat.server.agent.Agent;
|
||||
import com.tencent.supersonic.chat.server.pojo.ChatParseContext;
|
||||
import com.tencent.supersonic.common.util.BeanMapper;
|
||||
import com.tencent.supersonic.headless.api.pojo.request.QueryReq;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class QueryReqConverter {
|
||||
|
||||
@@ -18,6 +21,10 @@ public class QueryReqConverter {
|
||||
queryReq.setEnableLLM(true);
|
||||
}
|
||||
queryReq.setDataSetIds(agent.getDataSetIds());
|
||||
if (Objects.nonNull(queryReq.getMapInfo())
|
||||
&& MapUtils.isNotEmpty(queryReq.getMapInfo().getDataSetElementMatches())) {
|
||||
queryReq.setMapInfo(queryReq.getMapInfo());
|
||||
}
|
||||
return queryReq;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user