PromptUtility

public class PromptUtility
extends Object

java.lang.Object
   ↳ com.android.tradefed.ai.PromptUtility


A utility to craft prompts from context.

Summary

Public constructors

PromptUtility()

Public methods

static PromptResponse runPromptTemplate(String apiKey, File templatePrompt, Set<String> requiredLogs, boolean logPromptOnly, TestDescription description, String stacktrace, Map<String, File> contextFiles)

Craft a prompt based on a template

static PromptResponse runPromptTemplate(String apiKey, PromptUtility.PromptTemplate template, boolean logPromptOnly, TestDescription description, String stacktrace, Map<String, File> contextFiles)

Public constructors

PromptUtility

public PromptUtility ()

Public methods

runPromptTemplate

public static PromptResponse runPromptTemplate (String apiKey, 
                File templatePrompt, 
                Set<String> requiredLogs, 
                boolean logPromptOnly, 
                TestDescription description, 
                String stacktrace, 
                Map<String, File> contextFiles)

Craft a prompt based on a template

Parameters
logPromptOnly boolean

Returns
PromptResponse

runPromptTemplate

public static PromptResponse runPromptTemplate (String apiKey, 
                PromptUtility.PromptTemplate template, 
                boolean logPromptOnly, 
                TestDescription description, 
                String stacktrace, 
                Map<String, File> contextFiles)

Parameters
apiKey String

template PromptUtility.PromptTemplate

logPromptOnly boolean

description TestDescription

stacktrace String

contextFiles Map

Returns
PromptResponse