Skip to content

Commit

Permalink
merge and rename
Browse files Browse the repository at this point in the history
  • Loading branch information
shibeshduw committed Oct 9, 2024
2 parents dc53772 + 03184a9 commit ce64f93
Show file tree
Hide file tree
Showing 92 changed files with 1,031 additions and 678 deletions.
5 changes: 0 additions & 5 deletions .changeset/bright-jokes-provide.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/bright-trees-grow.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/famous-needles-act.md

This file was deleted.

12 changes: 0 additions & 12 deletions .changeset/kind-boxes-teach.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/smart-chefs-double.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tiny-pears-walk.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/two-bottles-juggle.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/unlucky-rivers-work.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/yellow-mails-exist.md

This file was deleted.

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

# SAP Cloud SDK for AI

Integrate chat completion into your business applications with SAP Cloud SDK for AI. Leverage the generative AI hub of SAP AI Core to make use of templating, grounding, data masking, content filtering and more. Setup your SAP AI Core instance with SAP Cloud SDK for AI Core.
Integrate chat completion into your business applications with SAP Cloud SDK for AI. Leverage the generative AI hub of [SAP AI Core](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/what-is-sap-ai-core) to make use of templating, grounding, data masking, content filtering and more. Setup your SAP AI Core instance with SAP Cloud SDK for AI Core.

### Table of Contents

- [Requirements and Setup](#requirements-and-setup)
- [Packages](#packages)
- [@sap-ai-sdk/ai-api](#sap-ai-sdkai-api)
- [@sap-ai-sdk/foundation-models](#sap-ai-sdkfoundation-models)
Expand All @@ -19,6 +20,10 @@ Integrate chat completion into your business applications with SAP Cloud SDK for
- [Code of Conduct](#code-of-conduct)
- [Licensing](#licensing)

## Requirements and Setup

See the documentation of each individual package under the [Packages](#packages) section.

## Packages

This project publishes multiple packages and is managed using [pnpm](https://pnpm.io/)
Expand Down
47 changes: 28 additions & 19 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
import flatConfig from '@sap-cloud-sdk/eslint-config/flat-config.js';

export default [
...flatConfig,
{
// Eslint flat config is not supported by eslint-plugin-import.
// https://github.com/import-js/eslint-plugin-import/issues/2556
files: ['**/*.ts'],
rules: {
'import/namespace': 'off',
'import/no-internal-modules': 'off'
// TODO: add this once there is a new release of eslint-plugin-import
// 'import/no-internal-modules': [
// 'error',
// { allow: ['@sap-cloud-sdk/*/internal.js'] }
// ]
'import/no-internal-modules': [
'error',
{
allow: [
'@sap-cloud-sdk/*/internal.js',
'@sap-ai-sdk/*/internal.js',
'@langchain/core/**',
'langchain/**',
'*/index.js',
'*/client/**/index.js'
]
}
],
'import/no-useless-path-segments': [
'error',
{
noUselessIndex: false
}
]
}
},
{
Expand All @@ -25,19 +36,17 @@ export default [
},
{
files: [
'**/test-util/**/*.ts'
'**/test/**/*',
'**/test-util/**/*',
'**/*.test.ts',
'**/*.spec.ts',
'**/dist-cjs/**/*'
],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'import/no-internal-modules': 'off',
'no-unused-expressions': 'off',
'jsdoc/require-jsdoc': 'off'
}
},
{
files: ['packages/langchain/**/*.ts'],
rules: {
'import/no-internal-modules': 'off'
}
},
{
ignores: ['**/dist-cjs/**/*']
}
];
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sap-ai-sdk",
"version": "1.0.0",
"version": "1.1.0",
"description": "",
"keywords": [],
"license": "Apache-2.0",
Expand Down Expand Up @@ -38,18 +38,18 @@
"@sap-ai-sdk/core": "workspace:^",
"@sap-ai-sdk/foundation-models": "workspace:^",
"@sap-ai-sdk/orchestration": "workspace:^",
"@sap-cloud-sdk/connectivity": "^3.21.0",
"@sap-cloud-sdk/eslint-config": "^3.21.0",
"@sap-cloud-sdk/generator-common": "^3.21.0",
"@sap-cloud-sdk/http-client": "^3.21.0",
"@sap-cloud-sdk/openapi-generator": "^3.21.0",
"@sap-cloud-sdk/util": "^3.21.0",
"@sap-cloud-sdk/connectivity": "^3.22.1",
"@sap-cloud-sdk/eslint-config": "^3.22.1",
"@sap-cloud-sdk/generator-common": "^3.22.1",
"@sap-cloud-sdk/http-client": "^3.22.1",
"@sap-cloud-sdk/openapi-generator": "^3.22.1",
"@sap-cloud-sdk/util": "^3.22.1",
"@types/jest": "^29.5.13",
"@types/jsonwebtoken": "^9.0.7",
"@types/mock-fs": "^4.13.4",
"@types/node": "^20.16.10",
"@types/node": "^20.16.11",
"depcheck": "^1.4.7",
"eslint": "^9.11.1",
"eslint": "^9.12.0",
"glob": "^11.0.0",
"jest": "^30.0.0-alpha.6",
"jsonwebtoken": "^9.0.2",
Expand All @@ -58,6 +58,6 @@
"prettier": "^3.3.3",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.6.2"
"typescript": "^5.6.3"
}
}
16 changes: 16 additions & 0 deletions packages/ai-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @sap-ai-sdk/ai-api

## 1.1.0

### Minor Changes

- 5bd2e4d: [Compatibility Note] Move `modelsGet()` from `ModelApi` to `ScenarioApi`, and remove `ModelAPI`.
- 5bd2e4d: [Fixed Issue] Fix `AiExecutionModificationResponseList` type to correctly represent an array of responses or errors.
- 771f986: [Fixed Issue] Fix sending the correct resource group headers when custom resource group is set.
- 5bd2e4d: [Improvement] Add `kubesubmitV4ResourceQuotaGetDeploymentQuota()` function in `DeploymentApi` to get details about quota and usage for deployments. Additionally introduce two new types `BckndDeploymentQuotaItem` and `BckndDeploymentResourceQuotaResponse`.

### Patch Changes

- 506a1e4: [Fixed Issue] Fix missing and unused dependencies.
- Updated dependencies [506a1e4]
- Updated dependencies [771f986]
- @sap-ai-sdk/core@1.1.0

## 1.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ To ensure compatibility and manage updates effectively, we strongly recommend us

## Prerequisites

- [Enable the AI Core service in BTP](https://help.sap.com/docs/sap-ai-api/sap-ai-api-service-guide/initial-setup).
- [Enable the AI Core service in BTP](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/initial-setup).
- Project configured with Node.js v20 or higher and native ESM support enabled.

## Usage
Expand Down
4 changes: 2 additions & 2 deletions packages/ai-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sap-ai-sdk/ai-api",
"version": "1.0.0",
"version": "1.1.0",
"description": "",
"license": "Apache-2.0",
"keywords": [
Expand Down Expand Up @@ -30,6 +30,6 @@
},
"dependencies": {
"@sap-ai-sdk/core": "workspace:^",
"@sap-cloud-sdk/connectivity": "^3.21.0"
"@sap-cloud-sdk/connectivity": "^3.22.1"
}
}
12 changes: 6 additions & 6 deletions packages/ai-api/src/tests/artifact-api.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import nock from 'nock';
import {
AiArtifactCreationResponse,
AiArtifactList,
AiArtifactPostData,
ArtifactApi
} from '../client/AI_CORE_API/index.js';
import { ArtifactApi } from '../client/AI_CORE_API';
import {
aiCoreDestination,
mockClientCredentialsGrantCall
} from '../../../../test-util/mock-http.js';
import type {
AiArtifactCreationResponse,
AiArtifactList,
AiArtifactPostData
} from '../client/AI_CORE_API';

describe('artifact', () => {
beforeEach(() => {
Expand Down
12 changes: 6 additions & 6 deletions packages/ai-api/src/tests/configuration-api.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import nock from 'nock';
import {
AiConfigurationBaseData,
AiConfigurationCreationResponse,
AiConfigurationList,
ConfigurationApi
} from '../client/AI_CORE_API/index.js';
import { ConfigurationApi } from '../client/AI_CORE_API';
import {
aiCoreDestination,
mockClientCredentialsGrantCall
} from '../../../../test-util/mock-http.js';
import type {
AiConfigurationBaseData,
AiConfigurationCreationResponse,
AiConfigurationList
} from '../client/AI_CORE_API';

describe('configuration', () => {
beforeEach(() => {
Expand Down
14 changes: 7 additions & 7 deletions packages/ai-api/src/tests/deployment-api.test.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import nock from 'nock';
import { DeploymentApi } from '../client/AI_CORE_API';
import {
aiCoreDestination,
mockClientCredentialsGrantCall
} from '../../../../test-util/mock-http.js';
import type {
AiDeploymentCreationRequest,
AiDeploymentCreationResponse,
AiDeploymentDeletionResponse,
AiDeploymentList,
AiDeploymentModificationRequest,
AiDeploymentModificationResponse,
AiDeploymentTargetStatus,
DeploymentApi
} from '../client/AI_CORE_API/index.js';
import {
aiCoreDestination,
mockClientCredentialsGrantCall
} from '../../../../test-util/mock-http.js';
AiDeploymentTargetStatus
} from '../client/AI_CORE_API';

describe('deployment', () => {
beforeEach(() => {
Expand Down
12 changes: 6 additions & 6 deletions packages/ai-api/src/tests/execution-api.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import nock from 'nock';
import {
AiEnactmentCreationRequest,
AiExecutionCreationResponse,
AiExecutionList,
ExecutionApi
} from '../client/AI_CORE_API/index.js';
import { ExecutionApi } from '../client/AI_CORE_API';
import {
aiCoreDestination,
mockClientCredentialsGrantCall
} from '../../../../test-util/mock-http.js';
import type {
AiEnactmentCreationRequest,
AiExecutionCreationResponse,
AiExecutionList
} from '../client/AI_CORE_API';

describe('execution', () => {
beforeEach(() => {
Expand Down
3 changes: 2 additions & 1 deletion packages/ai-api/src/tests/scenario-api.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import nock from 'nock';
import { ScenarioApi, AiScenarioList } from '../client/AI_CORE_API/index.js';
import { ScenarioApi } from '../client/AI_CORE_API';
import {
aiCoreDestination,
mockClientCredentialsGrantCall
} from '../../../../test-util/mock-http.js';
import type { AiScenarioList } from '../client/AI_CORE_API';

describe('scenario', () => {
beforeEach(() => {
Expand Down
4 changes: 2 additions & 2 deletions packages/ai-api/src/utils/deployment-cache.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type AiDeployment } from '../client/AI_CORE_API/index.js';
import { type AiDeployment } from '../client/AI_CORE_API';
import { deploymentCache } from './deployment-cache.js';
import { FoundationModel } from './model.js';
import type { FoundationModel } from './model.js';

describe('deployment cache', () => {
afterEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-api/src/utils/deployment-resolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
aiCoreDestination,
mockDeploymentsList
} from '../../../../test-util/mock-http.js';
import { type AiDeployment } from '../client/AI_CORE_API/index.js';
import { type AiDeployment } from '../client/AI_CORE_API';
import { resolveDeploymentId } from './deployment-resolver.js';
import { deploymentCache } from './deployment-cache.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/ai-api/src/utils/model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AiDeployment } from '../client/AI_CORE_API/index.js';
import type { AiDeployment } from '../client/AI_CORE_API/index.js';

/**
* A foundation model is identified by its name and optionally a version.
Expand Down
10 changes: 10 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @sap-ai-sdk/core

## 1.1.0

### Minor Changes

- 771f986: [Fixed Issue] Fix sending the correct resource group headers when custom resource group is set.

### Patch Changes

- 506a1e4: [Fixed Issue] Fix missing and unused dependencies.

## 1.0.0

## 0.1.0
Loading

0 comments on commit ce64f93

Please sign in to comment.