CurlGenAiClient

public class CurlGenAiClient
extends Object

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


提供一个中央客户端,用于与 GenAi API 互动并发出提示请求。这需要设置有效的 API_KEY。

摘要

公共构造函数

CurlGenAiClient()

公共方法

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

请求执行提示。

PromptResponse runPrompt(String apiKey, String prompt)

请求执行提示。

PromptResponse runPrompt(String apiKey, String prompt, data)

请求执行提示。

公共构造函数

CurlGenAiClient

public CurlGenAiClient ()

公共方法

runPrompt

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

请求执行提示。

参数
model CurlGenAiClient.Model:要使用的模型。

apiKey String:用于查询的 API_KEY。

prompt String:正在使用的提示。

data :要与提示关联的内嵌文件数据。

返回
PromptResponse

runPrompt

public PromptResponse runPrompt (String apiKey, 
                String prompt)

请求执行提示。

参数
apiKey String:用于查询的 API_KEY。

prompt String:正在使用的提示。

返回
PromptResponse

runPrompt

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

请求执行提示。

参数
apiKey String:用于查询的 API_KEY。

prompt String:正在使用的提示。

data :要与提示关联的内嵌文件数据。

返回
PromptResponse