GenerativeModelFutures


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

Hàm đồng hành công khai

GenerativeModelFutures

Hàm công khai

abstract ListenableFuture<GenerateContentResponse>
generateContent(vararg prompt: Content)

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

abstract Publisher<GenerateContentResponse>
generateContentStream(vararg prompt: Content)

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 GenerativeModel

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

Hàm đồng hành công khai

từ

fun from(model: GenerativeModel): GenerativeModelFutures
Giá trị trả về
GenerativeModelFutures

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

Hàm công khai

generateContent

abstract fun generateContent(vararg prompt: Content): ListenableFuture<GenerateContentResponse>

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

Tham số
vararg prompt: Content

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

generateContentStream

abstract fun generateContentStream(vararg prompt: Content): Publisher<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.

Tham số
vararg prompt: Content

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

getGenerativeModel

abstract fun getGenerativeModel(): GenerativeModel

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