genai-hub-orchestration
Configure and use the SAP AI Core Orchestration service: build prompt templates, add content filtering, set up document grounding (RAG) pipelines, and call…
от SAP★ 162 звезды на GitHub
Установить genai-hub-orchestration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Rules
- Orchestration always requires a running orchestration deployment as a prerequisite — invoke
aicore-lifecycle-managementfirst if one does not exist. - The orchestration endpoint is
POST {DEPLOYMENT_URL}/v2/completion— not/v1/chat/completions. - Orchestration
scenario_idandexecutable_idare always"orchestration"— these are fixed. - The Harmonized API normalizes all models to OpenAI message format — the same client code works for GPT, Gemini, and Bedrock.
- If credentials are not configured, invoke
aicore-admin-resourcesfirst. generative-ai-hub-sdkis deprecated — always usesap-ai-sdk-gen. Import namespacegen_ai_hubis shared by both.- If the user's request does not explicitly specify an approach, use
AskUserQuestionto ask whether they prefer the REST API (curl) or the Python SDK before writing or running any code.
Deployment Prerequisite
Before using the orchestration service, a deployment must be running:
# Check for an existing orchestration deployment:
uv run skills/aicore-lifecycle-management/scripts/get_deployments.py --scenario orchestration
# If none exists, create a configuration first (reuse if "orchestration" config already exists):
uv run skills/aicore-lifecycle-management/scripts/get_configurations.py --scenario-id orchestration --json | jq '.[] | select(.name == "orchestration")'
uv run skills/aicore-lifecycle-management/scripts/create_configuration.py \
--name orchestration \
--scenario-id orchestration \
--executable-id orchestration
# Then deploy (takes up to 10 minutes):
uv run skills/aicore-lifecycle-management/scripts/create_deployment.py --configuration-id <config-id> --wait --timeout 600
Workflow
| Step | Action | Key Gate |
|---|---|---|
| 1 | Verify orchestration deployment is RUNNING | get_deployments.py --scenario orchestration |
| 2 | If approach not stated: ask curl (REST API) or Python SDK via AskUserQuestion |
User preference |
| 3 | Choose pipeline features (templating only / + filtering / + grounding) | User intent |
| 4 | Select template from assets/ or build from scratch |
See asset map below |
| 5 | Run and verify output | uv run assets/<template>.py |
Asset Map
| Use case | Template |
|---|---|
| Basic chat via orchestration pipeline | assets/orchestration_basic.py |
| Chat with content filtering (input + output) | assets/orchestration_filtering.py |
| RAG with document grounding | assets/rag_grounding.py |
Python SDK — Key Patterns
Basic pipeline
from gen_ai_hub.orchestration.service import OrchestrationService
from gen_ai_hub.orchestration.models.config import OrchestrationConfig
from gen_ai_hub.orchestration.models.llm import LLM
from gen_ai_hub.orchestration.models.template import Template, TemplateValue
from gen_ai_hub.orchestration.models.message import SystemMessage, UserMessage
config = OrchestrationConfig(
template=Template(messages=[
SystemMessage("You are a helpful assistant."),
UserMessage("{{?user_query}}"),
]),
llm=LLM(name="gpt-4o-mini", version="latest"),
)
svc = OrchestrationService(config=config)
result = svc.run(template_values=[TemplateValue("user_query", "Hello")])
print(result.orchestration_result.choices[0].message.content)
Add content filtering
from gen_ai_hub.orchestration.models.content_filtering import (
ContentFiltering,
InputFiltering,
OutputFiltering,
)
from gen_ai_hub.orchestration.models.azure_content_filter import AzureContentFilter
filtering = ContentFiltering(
input_filtering=InputFiltering(filters=[AzureContentFilter(hate=2, violence=2, sexual=2, self_harm=2)]),
output_filtering=OutputFiltering(filters=[AzureContentFilter(hate=2, violence=2, sexual=2, self_harm=2)]),
)
config = OrchestrationConfig(template=..., llm=..., filtering=filtering)
REST API (curl)
export TOKEN=$(uv run skills/aicore-admin-resources/scripts/get_token.py)
export DEPLOYMENT_URL=$(uv run skills/aicore-lifecycle-management/scripts/get_deployments.py \
--scenario orchestration --json 2>/dev/null | jq -r '.[0].deployment_url')
export RESOURCE_GROUP=$(uv run skills/aicore-admin-resources/scripts/check_setup.py 2>/dev/null | jq -r '.resource_group')
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash - 02
Read
Вложенные файлы
- assets/orchestration_basic.py
- assets/orchestration_filtering.py
- assets/rag_grounding.py
- evals/evals.json
- references/GROUNDING.md
- references/ORCHESTRATION.md
FAQ
Что делает скилл genai-hub-orchestration?
Configure and use the SAP AI Core Orchestration service: build prompt templates, add content filtering, set up document grounding (RAG) pipelines, and call models via the Harmonized API. WHEN: user asks about the orchestration service, Harmonized API, prompt templating with variables, content filtering, grounding, RAG pipeline, document grounding, or building a pipeline that wraps an LLM. DO NOT USE FOR: creating an orchestration deployment — use `aicore-lifecycle-management` for that; credential setup — use `aicore-admin-resources`; browsing or deploying foundation models directly without a pipeline — use `genai-hub-foundation-models`; direct LLM inference without a pipeline — use `aicore-sdk-java` or `aicore-sdk-js`
Как установить скилл genai-hub-orchestration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл genai-hub-orchestration запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…