AS AgentScopeAPI 手册 / API Reference
类class agentscope.app.rag

AsyncReadable

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 -1intn(类型 `int`)。The maximum number of bytes to read; `-1` drains the stream.
返回Returns bytes
返回字节。`bytes`:
源码Source agentscope/app/rag/blob_store/_base.py:32–43
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.