pass previous tool context into few-shot query
This commit is contained in:
@@ -144,6 +144,10 @@ public class McpSseService {
|
||||
if (fewShotNl2SqlToolName().equals(toolView.name())) {
|
||||
addStringProperty(properties, "scopeGameKey",
|
||||
"선택 사항입니다. game_scope_resolve가 반환한 SUPPORTED gameKey만 전달하세요.", 128);
|
||||
ObjectNode plan = properties.putObject("queryPlan");
|
||||
plan.put("type", "object");
|
||||
plan.put("description", "앞 단계 game_query_plan의 구조화된 결과입니다.");
|
||||
plan.putObject("additionalProperties").put("type", "object");
|
||||
}
|
||||
required.add("prompt");
|
||||
}
|
||||
@@ -207,8 +211,9 @@ public class McpSseService {
|
||||
response = queryTool
|
||||
? selectAiService.generateAndExecute(token, prompt)
|
||||
: fewShotNl2SqlTool
|
||||
? selectAiService.generateAndExecute(token, prompt,
|
||||
arguments.path("scopeGameKey").asText(""))
|
||||
? selectAiService.generateAndExecute(token, prompt,
|
||||
arguments.path("scopeGameKey").asText(""),
|
||||
arguments.path("queryPlan"))
|
||||
: selectAiService.generatePrompt(token, prompt);
|
||||
}
|
||||
} catch (VpdTokenAccessDeniedException ignored) {
|
||||
|
||||
Reference in New Issue
Block a user