类class
agentscope.app.ragAsyncReadable
class AsyncReadable(Protocol)
源码Source
agentscope/app/rag/blob_store/_base.py:23–43异步可读,把私有文档转化为可检索的知识。位于 agentscope.app.rag 包,继承自 Protocol。核心成员包括 read。
Backed by aiofiles handles for the local store and by streaming
response bodies for object-storage backends. The narrow interface
keeps the worker's blob-reading code identical across backends
even though no single concrete type implements both shapes.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
async def read(n: int = -1) -> bytesasync | 设置读取。 Read up to ``n`` bytes (``-1`` reads to EOF). |
方法详情Method Detail
read
async def read(n: int = -1) -> bytes
async
设置读取。
Read up to n bytes (-1 reads to EOF).
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
n默认default -1 | int | n(类型 `int`)。The maximum number of bytes to read; `-1` drains the stream. |
bytes
返回字节。`bytes`:
源码Source
agentscope/app/rag/blob_store/_base.py:32–43