We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15f100c commit a506295Copy full SHA for a506295
livekit-rtc/livekit/rtc/data_stream.py
@@ -49,6 +49,7 @@ class TextStreamInfo(BaseStreamInfo):
49
@dataclass
50
class TextStreamUpdate:
51
current: str
52
+ index: int
53
collected: str
54
55
@@ -86,7 +87,9 @@ async def __anext__(self) -> TextStreamUpdate:
86
87
chunk_list = list(self._chunks.values())
88
chunk_list.sort(key=lambda chunk: chunk.chunk_index)
89
collected: str = "".join(map(lambda chunk: chunk.content.decode(), chunk_list))
- return TextStreamUpdate(current=decodedStr, collected=collected)
90
+ return TextStreamUpdate(
91
+ current=decodedStr, index=item.chunk_index, collected=collected
92
+ )
93
94
@property
95
def info(self) -> TextStreamInfo:
0 commit comments