Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
jina-serve【部署与运维】Use Jina-serve to build, serve, orchestrate, call, observe, and deploy AI microservices and pipelines with the jina Python package.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this repo skill when a task involves the jina Python package, Jina-serve, Executor, Deployment, Flow, Gateway, Client, DocArray-based service IO, Jina CLI commands, or Jina cloud-native deployment surfaces.
This skill is self-contained for the versioned Jina-serve package baseline in repo provenance. It does not require the original repository checkout.
Install a public package release:
pip install "jina==3.34.1"
For the current latest compatible release, use:
pip install -U jina
Verify the install:
python -c "from jina import Executor, Flow, Deployment, Client, requests; import jina; print(jina.__version__)"
jina --version
For a richer read-only diagnostic, run the bundled helper:
python scripts/check_jina_install.py
Read install and compatibility before changing dependency variants, Python versions, DocArray/Pydantic/Protobuf/GRPC pins, or optional service extras.
jina help, jina -vf, YAML/JAML, environment variables, telemetry opt-out, schemas, autocomplete, and parser inspection.Executor classes, @requests endpoints, DocArray schemas, standalone Deployments, dynamic batching, Executor templates, Hub packaging, and GPU-executor prerequisites.Flows, Gateway protocols, Flow/Deployment YAML, readiness/profiling, replicas/shards, topology decisions, and static exports to Docker Compose or Kubernetes YAML.Client construction, request batching, async/streaming calls, retries, callbacks, parameters, target executors, protocol/TLS mismatches, and response handling.Common public imports verified for this baseline:
from jina import Executor, Flow, Deployment, Client, requests
from jina import dynamic_batching, monitor
from docarray import BaseDoc, DocList
The core mental model:
BaseDoc and DocList.Executor subclass and expose methods with @requests.Deployment, or compose several services with Flow.Gateway using gRPC, HTTP, WebSocket, or multi-protocol settings.Client.post() or streaming/async client APIs.Read API overview for signatures and route ownership.
Client usage for production callers; Flow.post() and Deployment.post() are convenient for local debugging while the object is in scope.Deployment/Flow definitions when you need reproducible config independent of Python service logic.