feat: add from_variable_selector for stream chunk / message event (#8228)

This commit is contained in:
takatost
2024-09-10 22:15:50 +08:00
committed by GitHub
parent fdbbdb706f
commit cee0c51dbb
5 changed files with 23 additions and 6 deletions

View File

@@ -90,6 +90,7 @@ class MessageStreamResponse(StreamResponse):
event: StreamEvent = StreamEvent.MESSAGE
id: str
answer: str
from_variable_selector: Optional[list[str]] = None
class MessageAudioStreamResponse(StreamResponse):
@@ -479,6 +480,7 @@ class TextChunkStreamResponse(StreamResponse):
"""
text: str
from_variable_selector: Optional[list[str]] = None
event: StreamEvent = StreamEvent.TEXT_CHUNK
data: Data