[improvement][chat]Move generation of semantic text info and rewrite of error message to dedicated ResultProcessor.

This commit is contained in:
jerryjzhang
2024-10-27 22:34:16 +08:00
parent bb363a0286
commit b69ee81d58
13 changed files with 165 additions and 124 deletions

View File

@@ -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