Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计提醒

sap-cloud-sdk-aiSAP cloud SDK AI 搜索

Agent Skill

sap-cloud-sdk-ai 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,794

周安装

74

GitHub Stars

239

下载量

586
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:sap-cloud-sdk-ai(SAP cloud SDK AI 搜索)
来源仓库:https://github.com/secondsky/sap-skills
仓库路径:skills/sap-cloud-sdk-ai
安装命令:
npx skills add https://github.com/secondsky/sap-skills --skill sap-cloud-sdk-ai
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/secondsky/sap-skills --skill sap-cloud-sdk-ai

简介

用于查找、检索和筛选 SAP Cloud SDK AI 相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据任务场景快速定位资料。
  • 通过 npx skills add 命令从 GitHub 仓库安装使用。
  • 建议确认权限范围和维护状态,避免触发联网或文件读写操作。
  • 可结合原始 README 进一步核验具体用法和功能边界。

SKILL.md

SAP Cloud SDK for AI

The official SDK for SAP AI Core, SAP Generative AI Hub, and Orchestration Service.

When to Use This Skill

Use this skill when:

  • Integrating AI/LLM capabilities into SAP BTP applications
  • Building chat completion or embedding features
  • Using GPT-4o, Claude, Gemini, or other models via SAP AI Core
  • Implementing content filtering, data masking, or document grounding
  • Creating agentic workflows with LangChain or Spring AI
  • Managing prompts via Prompt Registry
  • Deploying AI models on SAP AI Core

Table of Contents

Quick Start

Note: This skill uses SAP Cloud SDK for AI v2.2.0+. If you're migrating from v1.x, see V1 to V2 Migration Guide for breaking changes.

JavaScript/TypeScript

npm install @sap-ai-sdk/orchestration@^2
import { OrchestrationClient } from '@sap-ai-sdk/orchestration';

const client = new OrchestrationClient({
  promptTemplating: {
    model: { name: 'gpt-4o' },
    prompt: [{ role: 'user', content: '{{?question}}' }]
  }
});

const response = await client.chatCompletion({
  placeholderValues: { question: 'What is SAP?' }
});
console.log(response.getContent());

Java

<dependency>
  <groupId>com.sap.ai.sdk</groupId>
  <artifactId>orchestration</artifactId>
  <version>${ai-sdk.version}</version>
</dependency>
var client = new OrchestrationClient();
var config = new OrchestrationModuleConfig()
    .withLlmConfig(OrchestrationAiModel.GPT_4O);
var prompt = new OrchestrationPrompt("What is SAP?");
var result = client.chatCompletion(prompt, config);
System.out.println(result.getContent());

Prerequisites

  • Node.js 20+ (JavaScript) or Java 17+ (Java)
  • SAP AI Core service instance (extended or sap-internal plan)
  • Orchestration deployment in AI Core (default resource group has this)

Connection Setup

BTP Runtime (Cloud Foundry/Kyma)

Bind AI Core service instance to your application. SDK auto-detects via VCAP_SERVICES or mounted secrets.

Local Development

Set environment variable:

export AICORE_SERVICE_KEY='{"clientid":"...","clientsecret":"...","url":"...","serviceurls":{"AI_API_URL":"..."}}'

Or use CAP hybrid mode:

# JavaScript
cds bind -2 <AICORE_INSTANCE> && cds-tsx watch --profile hybrid

# Java
cds bind --to aicore --exec mvn spring-boot:run

For detailed connection options, see references/connecting-to-ai-core.md

Available Packages

JavaScript/TypeScript

PackagePurpose
@sap-ai-sdk/orchestrationChat completion, filtering, grounding
@sap-ai-sdk/foundation-modelsDirect model access (OpenAI)
@sap-ai-sdk/langchainLangChain integration
@sap-ai-sdk/ai-apiDeployments, artifacts, configurations
@sap-ai-sdk/document-groundingPipeline, Vector, Retrieval APIs
@sap-ai-sdk/prompt-registryPrompt template management

Java

ArtifactPurpose
orchestrationChat completion, filtering, grounding
openai (foundationmodels)Direct OpenAI model access
coreBase connectivity
document-groundingPipeline, Vector, Retrieval APIs
prompt-registryPrompt template management

Supported Models

Recommended

  • OpenAI: gpt-4o, gpt-4o-mini, o1, o3-mini
  • Anthropic (AWS): Claude 3.5 Sonnet, Claude 4
  • Amazon: Nova Pro, Nova Lite, Nova Micro
  • Google: Gemini 2.5 Flash, Gemini 2.0 Flash
  • Mistral: Medium, Large

Deprecated Models (Use Replacements)

DeprecatedUse Instead
text-embedding-ada-002text-embedding-3-small/large
gpt-35-turbo (all variants)gpt-4o-mini
gpt-4-32kgpt-4o
gpt-4 (base)gpt-4o or gpt-4.1
gemini-1.0-progemini-2.0-flash
gemini-1.5-pro/flashgemini-2.5-flash
mistralai--mixtral-8x7bmistralai--mistral-small-instruct

Core Features

Chat Completion with Streaming

// JavaScript
const stream = client.stream({
  placeholderValues: { question: 'Explain SAP CAP' }
});

for await (const chunk of stream.toContentStream()) {
  process.stdout.write(chunk);
}
// Java
client.streamChatCompletion(prompt, config)
    .forEach(chunk -> System.out.print(chunk.getDeltaContent()));

Function/Tool Calling

// JavaScript
const tools = [{
  type: 'function',
  function: {
    name: 'get_weather',
    parameters: { type: 'object', properties: { city: { type: 'string' } } }
  }
}];

const response = await client.chatCompletion({
  placeholderValues: { question: 'Weather in Berlin?' }
}, { tools });

const toolCalls = response.getToolCalls();

Content Filtering

// JavaScript
import { buildAzureContentSafetyFilter } from '@sap-ai-sdk/orchestration';

const client = new OrchestrationClient({
  promptTemplating: { model: { name: 'gpt-4o' } },
  filtering: {
    input: buildAzureContentSafetyFilter({ Hate: 'ALLOW_SAFE' }),
    output: buildAzureContentSafetyFilter({ Violence: 'ALLOW_SAFE' })
  }
});

Data Masking

// JavaScript
const client = new OrchestrationClient({
  promptTemplating: { model: { name: 'gpt-4o' } },
  masking: {
    masking_providers: [{
      type: 'sap_data_privacy_integration',
      method: 'anonymization',
      entities: [{ type: 'profile-email' }, { type: 'profile-person' }]
    }]
  }
});

Document Grounding

// JavaScript
const client = new OrchestrationClient({
  promptTemplating: { model: { name: 'gpt-4o' } },
  grounding: {
    grounding_input: ['{{?question}}'],
    grounding_output: ['{{?context}}'],
    data_repositories: [{ type: 'vector', id: 'my-repo-id' }]
  }
});

Response Helpers

JavaScript SDK provides helper methods:

const response = await client.chatCompletion({ placeholderValues });

response.getContent();          // Model output string
response.getTokenUsage();       // { prompt_tokens, completion_tokens, total_tokens }
response.getFinishReason();     // 'stop', 'length', 'tool_calls', etc.
response.getToolCalls();        // Array of function calls
response.getDeltaToolCalls();   // Partial tool calls (streaming)
response.getAllMessages();      // Full message history
response.getAssistantMessage(); // Assistant response only
response.getRefusal();          // Refusal message if blocked

Streaming response methods:

const stream = client.stream({ placeholderValues });
for await (const chunk of stream.toContentStream()) {
  process.stdout.write(chunk);
}
// After stream ends:
stream.getFinishReason();
stream.getTokenUsage();

Advanced Topics

For detailed guidance:

  • Orchestration features: references/orchestration-guide.md
  • Foundation models (direct OpenAI): references/foundation-models-guide.md
  • LangChain integration: references/langchain-guide.md
  • Spring AI integration: references/spring-ai-guide.md
  • AI Core management: references/ai-core-api-guide.md

Bundled Resources

Reference Documentation

  • references/foundation-models-guide.md - Foundation models and pricing
  • references/ai-core-api-guide.md - AI Core service API reference
  • references/orchestration-guide.md - Orchestration service guide
  • references/langchain-guide.md - LangChain.js integration
  • references/spring-ai-guide.md - Spring AI integration
  • references/agentic-workflows.md - Agentic workflow patterns
  • references/connecting-to-ai-core.md - Connection setup guide
  • references/error-handling.md - Error handling patterns
  • references/v1-to-v2-migration.md - V1 to V2 migration guide

Version Information

SDKCurrent VersionNode/Java Requirement
JavaScript2.2.0+Node.js 20+
Java1.13.0 (Core) / 1.12.0 (Latest orchestration)Java 17+ (21 LTS recommended)

Note: Generated model classes (in ...model packages) may change in minor releases but are safe to use.

Common Errors

ErrorCauseSolution
"Could not find service bindings for 'aicore'"Missing AI Core bindingBind AI Core service or set AICORE_SERVICE_KEY
"Orchestration deployment not found"No deployment in resource groupDeploy orchestration in AI Core or use different resource group
Content filter violationInput/output blockedAdjust filter thresholds or modify content
Token limit exceededResponse too longSet max_tokens parameter

Documentation Sources

Keep this skill updated using these sources:

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.42%
按下载量换算167

Antigravity

23.85%
按下载量换算140

Gemini CLI

20%
按下载量换算117

windsurf

12.85%
按下载量换算75

trae

7.13%
按下载量换算42

OpenCode

3.81%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills