计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
client-api【效率与协作】Guides clip_client.Client connectivity, encoding, ranking, indexing, searching, async calls, callbacks, and client-side troubleshooting.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the user wants to call CLIP-as-service from Python or diagnose client-side behavior against an already-running server.
clip_client.Client to encode these text and image inputs."Client.profile() fail with AioRpcError?"aencode or callbacks for a large stream."index/search from the client after my search Flow is running."--server is supplied.n_dim, or reason about sharding/polling, route to search-retrieval.from clip_client import Client
client = Client("grpc://0.0.0.0:51000")
latency = client.profile()
embeddings = client.encode(["a red car", "a blue bicycle"])
print(latency, embeddings.shape)
Use TLS schemes (grpcs, https, websockets/wss) only when the server was started with matching TLS configuration. Use credential={"Authorization": "<token>"} or the CLIP_AUTH_TOKEN environment variable for authenticated gRPC/HTTP endpoints.
encode, index, or search is an error; wrap it in a list.encode(list[str]) returns a NumPy array. encode(DocumentArray) or encode(list[Document]) returns a DocumentArray containing the same objects with embeddings filled.Document to have cross-modal candidates in .matches unless source is overridden.DocumentArray depending on input type and method.Document.id values.grpc, http, or websocket; add s for TLS variants).Document/DocumentArray when you need explicit text/uri/blob/tensor fields, nested matches, chunks, or metadata preservation.batch_size and prefetch for memory/network behavior; very large streams may warn when length is unknown or high.on_done/on_always owns result collection, methods can return None instead of assembled results.Client.index and Client.search require a server Flow with an indexer. An encoder-only server can encode/rank but not search a corpus.Run the safe signature check before writing code in an unfamiliar environment:
python sub-skills/client-api/scripts/check_client_api.py
If a real server is available and the user approves a network call, profile it explicitly:
python sub-skills/client-api/scripts/check_client_api.py --server grpc://127.0.0.1:51000 --profile