GenerateContentStreamResult interface

ออบเจ็กต์ผลลัพธ์ที่ได้จากการเรียกใช้ GenerativeModel.generateContentStream() ทำซ้ำเกิน stream เพื่อรับเนื้อหาส่วนที่เข้ามาใหม่ และ/หรือใช้คำสัญญา response เพื่อรับคำตอบแบบรวมเมื่อสตรีมจบแล้ว

ลายเซ็น:

export interface GenerateContentStreamResult 

พร็อพเพอร์ตี้

พร็อพเพอร์ตี้ ประเภท คำอธิบาย
การตอบสนอง คำมั่นสัญญา<EnhancedGenerateContentResponse>
สตรีม AsyncGenerator<EnhancedGenerateContentResponse>

GenerateContentStream Results.response

ลายเซ็น:

response: Promise<EnhancedGenerateContentResponse>;

GenerateContentStream Results.stream

ลายเซ็น:

stream: AsyncGenerator<EnhancedGenerateContentResponse>;