pass previous tool context into few-shot query

This commit is contained in:
devmrko
2026-07-27 14:47:37 +09:00
parent 3a7e2ced00
commit ec5d731bf5
2 changed files with 14 additions and 2 deletions

View File

@@ -115,6 +115,13 @@ public class SelectAiService {
return response;
}
public JsonNode generateAndExecute(
String bearerToken, String prompt, String scopeGameKey, JsonNode priorToolContext) {
String context = priorToolContext == null || priorToolContext.isMissingNode()
|| priorToolContext.isNull() ? "" : "\n[PREVIOUS TOOL RESULT]\n" + priorToolContext;
return generateAndExecute(bearerToken, prompt + context, scopeGameKey);
}
private GameContext resolveGameContext(String bearerToken, String question) {
try {
List<GameCatalogVectorService.GameCandidate> candidates =