Since version 1.2.x of the AI module, the StreamedChatMessageIteratorInterface has introduced the doIterate() method as the standard way for providers to implement streaming logic. The getIterator() method has been deprecated and will be removed in version 2.0.0.
### Action Required
Provider developers should move their streaming logic from the getIterator() method to a new doIterate() method in their iterator classes.
### Before (Deprecated):
public function getIterator(): \Generator {
foreach ($this->iterator as $chunk) {
yield $this->createStreamedChatMessage(...);
}
}
###After (Recommended):
public function doIterate(): \Generator {
foreach ($this->iterator as $chunk) {
yield $this->createStreamedChatMessage(...);
}
}