GenerativeModelFutures


public abstract class GenerativeModelFutures


Phương thức trợ giúp để tương tác với GenerativeModel từ Java.

Xem thêm
from

Tóm tắt

Phương thức công khai

static final @NonNull GenerativeModelFutures
abstract @NonNull ListenableFuture<@NonNull GenerateContentResponse>

Tạo phản hồi từ mô hình hệ thống cho các Content đã cung cấp.

abstract @NonNull Publisher<@NonNull GenerateContentResponse>

Tạo phản hồi truyền trực tuyến từ mô hình hệ thống cho các Content đã cung cấp.

abstract @NonNull GenerativeModel

Trả về thực thể GenerativeModel được dùng để tạo đối tượng này

Phương thức công khai

từ

public static final @NonNull GenerativeModelFutures from(@NonNull GenerativeModel model)
Giá trị trả về
@NonNull GenerativeModelFutures

GenerativeModelFutures được tạo xung quanh getGenerativeModel được cung cấp

generateContent

public abstract @NonNull ListenableFuture<@NonNull GenerateContentResponsegenerateContent(@NonNull Content prompt)

Tạo phản hồi từ mô hình hệ thống cho các Content đã cung cấp.

Tham số
@NonNull Content prompt

Một nhóm Content đầu vào để gửi đến mô hình.

generateContentStream

public abstract @NonNull Publisher<@NonNull GenerateContentResponsegenerateContentStream(@NonNull Content prompt)

Tạo phản hồi truyền trực tuyến từ mô hình hệ thống cho các Content đã cung cấp.

Tham số
@NonNull Content prompt

Một nhóm Content đầu vào để gửi đến mô hình.

getGenerativeModel

public abstract @NonNull GenerativeModel getGenerativeModel()

Trả về thực thể GenerativeModel được dùng để tạo đối tượng này