Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nice-emus-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sap-ai-sdk/orchestration': minor
---

[feat] Update orchestration specification to 0.115.9
4 changes: 4 additions & 0 deletions packages/orchestration/src/client/api/schema/dpi-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ export type DpiConfig = {
*/
enabled?: boolean;
};
/**
* Type of masking method to be used for file inputs. Required if file inputs are provided.
*/
mask_file_input_method?: 'anonymization' | 'skip';
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/

/**
* A single base64 string representing the embedding.
*/
export type EmbeddingBase64String = string;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/

/**
* An array of floating point numbers representing the embedding.
*/
export type EmbeddingFloatArray = number[];
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/

/**
* A dictionary mapping encoding format names to their embeddings. Used when multiple encoding formats are requested (Cohere-specific).
*/
export type EmbeddingMultiFormat = {
/**
* Float encoding format - array of floating point numbers
*/
float?: number[];
/**
* Int8 encoding format - array of 8-bit integers
*/
int8?: number[];
/**
* Uint8 encoding format - array of unsigned 8-bit integers
*/
uint8?: number[];
/**
* Base64 encoding format - base64 encoded string
*/
base64?: string;
/**
* Binary encoding format - array of integers
*/
binary?: number[];
/**
* Ubinary encoding format - array of unsigned integers
*/
ubinary?: number[];
};
9 changes: 7 additions & 2 deletions packages/orchestration/src/client/api/schema/embedding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/

import type { EmbeddingFloatArray } from './embedding-float-array.js';
import type { EmbeddingBase64String } from './embedding-base-64-string.js';
import type { EmbeddingMultiFormat } from './embedding-multi-format.js';
/**
* Representation of the 'Embedding' schema.
*/
export type Embedding = number[] | string;
export type Embedding =
| EmbeddingFloatArray
| EmbeddingBase64String
| EmbeddingMultiFormat;
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,13 @@ import type { EmbeddingsInputText } from './embeddings-input-text.js';
*/
export type EmbeddingsInput = {
text: EmbeddingsInputText;
type?: 'text' | 'document' | 'query';
type?:
| 'text'
| 'document'
| 'query'
| 'search_document'
| 'search_query'
| 'classification'
| 'clustering'
| 'image';
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/

import type { EncodingFormat } from './encoding-format.js';
/**
* Additional parameters for generating input's embeddings. Default values are used for mandatory parameters.
*/
Expand All @@ -14,9 +14,9 @@ export type EmbeddingsModelParams = {
*/
dimensions?: number;
/**
* OpenAI's spec allows for 'float' and 'base64' encoding formats.
* The format to return the embeddings in. Can be a single format or an array of formats. OpenAI's spec allows for 'float' and 'base64' encoding formats.
*
*/
encoding_format?: 'float' | 'base64' | 'binary';
encoding_format?: EncodingFormat | EncodingFormat[];
normalize?: boolean;
} & Record<string, any>;
16 changes: 16 additions & 0 deletions packages/orchestration/src/client/api/schema/encoding-format.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/

/**
* Encoding format for embeddings.
*/
export type EncodingFormat =
| 'float'
| 'base64'
| 'binary'
| 'int8'
| 'uint8'
| 'ubinary';
4 changes: 4 additions & 0 deletions packages/orchestration/src/client/api/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ export * from './embeddings-input-text.js';
export * from './embeddings-module-configs.js';
export * from './embeddings-model-config.js';
export * from './embeddings-model-details.js';
export * from './encoding-format.js';
export * from './embeddings-model-params.js';
export * from './embeddings-post-response.js';
export * from './embeddings-response.js';
export * from './embeddings-usage.js';
export * from './embedding-result.js';
export * from './embedding-float-array.js';
export * from './embedding-base-64-string.js';
export * from './embedding-multi-format.js';
export * from './embedding.js';
export * from './chat-messages.js';
export * from './templating-chat-message.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export class OrchestrationEmbeddingResponse {
* @returns Array of embedding data objects containing both vectors, indices, and object types.
*/
getEmbeddings(): EmbeddingData[] {
// TODO: Remove non-null assertion when final_result is made mandatory in the schema
return this._data.final_result.data.map((result: EmbeddingResult) => ({
embedding: result.embedding,
index: result.index,
Expand Down
7 changes: 4 additions & 3 deletions packages/orchestration/src/orchestration-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import type {
EmbeddingsModelDetails as OriginalEmbeddingsModelDetails,
EmbeddingsModelParams as OriginalEmbeddingsModelParams,
SAPDocumentTranslationInput,
SAPDocumentTranslationOutput
SAPDocumentTranslationOutput,
Embedding
} from './client/api/schema/index.js';

/**
Expand Down Expand Up @@ -828,9 +829,9 @@ export interface EmbeddingData {
*/
object: 'embedding';
/**
* The embedding vector, either as a number array or base64-encoded string.
* The embedding vector, either as a number array, a base64-encoded string, or multiple formats in case multiple output formats were requested.
*/
embedding: number[] | string;
embedding: Embedding;
/**
* The index of the embedding in the list of embeddings.
*/
Expand Down
Loading