pass previous tool context into few-shot query
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user