18 lines
469 B
Python
18 lines
469 B
Python
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from typing import TYPE_CHECKING, Protocol, runtime_checkable
|
||
|
|
|
||
|
|
if TYPE_CHECKING:
|
||
|
|
from yuxi.channels.models import DeliveryResult
|
||
|
|
|
||
|
|
|
||
|
|
@runtime_checkable
|
||
|
|
class ChannelStreamingProtocol(Protocol):
|
||
|
|
@property
|
||
|
|
def streaming_modes(self) -> list[str]: ...
|
||
|
|
|
||
|
|
@property
|
||
|
|
def block_streaming(self) -> bool: ...
|
||
|
|
|
||
|
|
async def send_stream_chunk(self, chat_id: str, msg_id: str, chunk: str, finished: bool) -> DeliveryResult: ...
|