GenerativeModel.generateContentStream() 호출에서 반환된 결과 객체입니다. stream
를 반복하여 청크가 들어올 때 청크를 가져오거나 response
프로미스를 사용하여 스트림이 완료될 때 집계된 응답을 얻습니다.
서명:
export interface GenerateContentStreamResult
속성
속성 | 유형 | 설명 |
---|---|---|
응답 | 프로미스<EnhancedGenerateContentResponse> | |
stream | AsyncGenerator<EnhancedGenerateContentResponse> |
GenerateContentStreamResult.response
서명:
response: Promise<EnhancedGenerateContentResponse>;
GenerateContentStreamResult.stream
서명:
stream: AsyncGenerator<EnhancedGenerateContentResponse>;