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