UI はローカライズ済みです。スキルの紹介と説明文書は選択した言語へ AI が自動翻訳し、コード・コマンド・パス・専門用語は原文のままです。原作者の文書が優先されます。
スキルを探す
運用・デプロイ · SKILL.md

executor-service-patterns

executor-service-patterns

Build Jina Executor services, endpoints, DocArray schemas, Deployments, dynamic batching, templates, and Executor troubleshooting.

Independent GitHub snapshot · Automated classification · Original documentation governs

スキルの説明

GitHub

name: executor-service-patterns description: "Build Jina Executor services, endpoints, DocArray schemas, Deployments, dynamic batching, templates, and Executor troubleshooting." disable-model-invocation: true metadata: disco-role: operating license: Apache 2.0

Executor Service Patterns

Use this sub-skill when a task involves writing a Jina Executor, exposing @requests endpoints, serving a single service with Deployment, configuring uses_with or endpoint aliases, creating an Executor project, or debugging service startup/runtime errors.

Read first

Minimal service

from jina import Executor, Deployment, requests
from docarray import BaseDoc, DocList

class TextDoc(BaseDoc):
    text: str = ""

class UppercaseExecutor(Executor):
    @requests(on="/uppercase")
    def uppercase(self, docs: DocList[TextDoc], **kwargs) -> DocList[TextDoc]:
        for doc in docs:
            doc.text = doc.text.upper()
        return docs

with Deployment(uses=UppercaseExecutor, port=12345) as dep:
    out = dep.post(on="/uppercase", inputs=DocList[TextDoc]([TextDoc(text="hello")]), return_type=DocList[TextDoc])
    print(out[0].text)

For production, move the Executor into a module, define YAML, and start with jina deployment --uses deployment.yml.

Boundary rules

保存したスキル