Skip to content

Commit

Permalink
[improvement][headless]Restructure LLMReq and LLMSchema.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryjzhang committed Sep 12, 2024
1 parent 2b3acc8 commit ed78e29
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public LLMReq getLlmReq(ChatQueryContext queryCtx, Long dataSetId) {
}

llmReq.setCurrentDate(DateUtils.getBeforeDate(0));
llmReq.setTerms(getTerms(queryCtx, dataSetId));
llmReq.setTerms(getMappedTerms(queryCtx, dataSetId));
llmReq.setSqlGenType(
LLMReq.SqlGenType.valueOf(parserConfig.getParameterValue(PARSER_STRATEGY_TYPE)));
llmReq.setModelConfig(queryCtx.getModelConfig());
Expand All @@ -94,7 +94,7 @@ public LLMResp runText2SQL(LLMReq llmReq) {
return result;
}

protected List<LLMReq.Term> getTerms(ChatQueryContext queryCtx, Long dataSetId) {
protected List<LLMReq.Term> getMappedTerms(ChatQueryContext queryCtx, Long dataSetId) {
List<SchemaElementMatch> matchedElements =
queryCtx.getMapInfo().getMatchedElements(dataSetId);
if (CollectionUtils.isEmpty(matchedElements)) {
Expand Down

0 comments on commit ed78e29

Please sign in to comment.