Learn how to work with streaming responses in Polyglot.
stream
option to true
in your request:
stream()
method:
PartialInferenceResponse
object with these key properties:
contentDelta
: The new content received in this chunkcontent
: The accumulated content up to this pointfinishReason
: The reason why the response finished (empty until the final chunk)usage
: Token usage statistics