GenerateContentResponse


public final class GenerateContentResponse


表示模型的响应。

摘要

公共构造函数

公共方法

final @NonNull List<@NonNull Candidate>

模型生成的可能回答的列表

final String

一个便捷字段,表示响应中的第一个文本部分(如果有)。

公共构造函数

GenerateContentResponse

@VisibleForTesting(otherwise = 3)
public GenerateContentResponse(@NonNull List<@NonNull Candidate> candidates)

公共方法

getCandidates

public final @NonNull List<@NonNull CandidategetCandidates()

模型生成的可能回答的列表

getText

public final String getText()

一个便捷字段,表示响应中的第一个文本部分(如果有)。