CurlGenAiClient

public class CurlGenAiClient
extends Object

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


Provide a central client to interact with GenAi API and make prompt requests. This requires a valid API_KEY to be set.

Summary

Public constructors

CurlGenAiClient()

Public methods

PromptResponse runPrompt(CurlGenAiClient.Model model, String apiKey, String prompt, data)

Request a prompt to execute.

PromptResponse runPrompt(String apiKey, String prompt)

Request a prompt to execute.

PromptResponse runPrompt(String apiKey, String prompt, data)

Request a prompt to execute.

Public constructors

CurlGenAiClient

public CurlGenAiClient ()

Public methods

runPrompt

public PromptResponse runPrompt (CurlGenAiClient.Model model, 
                String apiKey, 
                String prompt, 
                 data)

Request a prompt to execute.

Parameters
model CurlGenAiClient.Model: The model to be used.

apiKey String: The API_KEY to be used for the query.

prompt String: The prompt being used.

data : The inline file data to be associated with the prompt.

Returns
PromptResponse

runPrompt

public PromptResponse runPrompt (String apiKey, 
                String prompt)

Request a prompt to execute.

Parameters
apiKey String: The API_KEY to be used for the query.

prompt String: The prompt being used.

Returns
PromptResponse

runPrompt

public PromptResponse runPrompt (String apiKey, 
                String prompt, 
                 data)

Request a prompt to execute.

Parameters
apiKey String: The API_KEY to be used for the query.

prompt String: The prompt being used.

data : The inline file data to be associated with the prompt.

Returns
PromptResponse