mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 20:51:48 +00:00
[improvement][chat]Move generation of semantic text info and rewrite of error message to dedicated ResultProcessor.
This commit is contained in:
@@ -64,11 +64,9 @@ public class S2ChatLayerService implements ChatLayerService {
|
||||
|
||||
@Override
|
||||
public MapResp map(QueryNLReq queryNLReq) {
|
||||
MapResp mapResp = new MapResp(queryNLReq.getQueryText());
|
||||
ChatQueryContext queryCtx = buildChatQueryContext(queryNLReq);
|
||||
ComponentFactory.getSchemaMappers().forEach(mapper -> mapper.map(queryCtx));
|
||||
mapResp.setMapInfo(queryCtx.getMapInfo());
|
||||
return mapResp;
|
||||
return new MapResp(queryNLReq.getQueryText(), queryCtx.getMapInfo());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user