Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions packages/document-grounding/src/client/api/retrieval-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ export const RetrievalApi = {
/**
* List data repository by id
* @param repositoryId - Repository ID
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @param queryParameters - Object containing the following keys: remoteName.
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
* @returns The request builder, use the `execute()` method to trigger the request.
*/
getDataRepositoryById: (
repositoryId: string,
headerParameters: { 'AI-Resource-Group': string },
queryParameters: { remoteName?: string }
queryParameters: { remoteName?: string },
headerParameters: { 'AI-Resource-Group': string }
) =>
new OpenApiRequestBuilder<DataRepository>(
'get',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
import type { ChatMessageContent } from './chat-message-content.js';
import type { MessageToolCalls } from './message-tool-calls.js';
import type { ReasoningBlock } from './reasoning-block.js';
/**
* Representation of the 'AssistantChatMessage' schema.
*/
Expand All @@ -13,4 +14,9 @@ export type AssistantChatMessage = {
content?: ChatMessageContent;
refusal?: string;
tool_calls?: MessageToolCalls;
/**
* Reasoning or thinking content from the model's previous turn.
*
*/
reasoning_content?: ReasoningBlock[];
};
6 changes: 6 additions & 0 deletions packages/orchestration/src/client/api/schema/chat-delta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import type { ToolCallChunk } from './tool-call-chunk.js';
import type { ReasoningBlock } from './reasoning-block.js';
/**
* Representation of the 'ChatDelta' schema.
*/
Expand All @@ -15,4 +16,9 @@ export type ChatDelta = {
*/
refusal?: string;
tool_calls?: ToolCallChunk[];
/**
* Reasoning or thinking content generated by the model before the final response.
*
*/
reasoning_content?: ReasoningBlock[];
} & Record<string, any>;
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import type { CompletionRequestConfigurationReferenceByIdConfigRef } from './completion-request-configuration-reference-by-id-config-ref.js';
import type { PartialOrchestrationConfig } from './partial-orchestration-config.js';
import type { ChatMessages } from './chat-messages.js';
/**
* Representation of the 'CompletionRequestConfigurationReferenceById' schema.
*/
export type CompletionRequestConfigurationReferenceById = {
config_ref: CompletionRequestConfigurationReferenceByIdConfigRef;
config?: PartialOrchestrationConfig;
/**
* @example {
* "groundingInput": "What is SAP Joule?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import type { CompletionRequestConfigurationReferenceByNameScenarioVersionConfigRef } from './completion-request-configuration-reference-by-name-scenario-version-config-ref.js';
import type { PartialOrchestrationConfig } from './partial-orchestration-config.js';
import type { ChatMessages } from './chat-messages.js';
/**
* Representation of the 'CompletionRequestConfigurationReferenceByNameScenarioVersion' schema.
*/
export type CompletionRequestConfigurationReferenceByNameScenarioVersion = {
config_ref: CompletionRequestConfigurationReferenceByNameScenarioVersionConfigRef;
config?: PartialOrchestrationConfig;
/**
* @example {
* "groundingInput": "What is SAP Joule?",
Expand Down
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 @@ -45,7 +45,9 @@ export * from './tool-call-chunk.js';
export * from './completion-post-response.js';
export * from './completion-post-response-streaming.js';
export * from './orchestration-config.js';
export * from './partial-orchestration-config.js';
export * from './module-configs.js';
export * from './partial-module-configs.js';
export * from './module-configs-list.js';
export * from './module-results-base.js';
export * from './module-results.js';
Expand All @@ -60,6 +62,7 @@ export * from './llm-choice.js';
export * from './llm-choice-streaming.js';
export * from './token-usage.js';
export * from './prompt-templating-module-config.js';
export * from './partial-prompt-templating-module-config.js';
export * from './llm-model-details.js';
export * from './template.js';
export * from './response-format-text.js';
Expand Down Expand Up @@ -120,3 +123,4 @@ export * from './completion-request-configuration-reference-by-id.js';
export * from './completion-request-configuration-reference-by-id-config-ref.js';
export * from './completion-request-configuration-reference-by-name-scenario-version.js';
export * from './completion-request-configuration-reference-by-name-scenario-version-config-ref.js';
export * from './reasoning-block.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* 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.
*/
import type { PartialPromptTemplatingModuleConfig } from './partial-prompt-templating-module-config.js';
import type { FilteringModuleConfig } from './filtering-module-config.js';
import type { MaskingModuleConfig } from './masking-module-config.js';
import type { GroundingModuleConfig } from './grounding-module-config.js';
import type { TranslationModuleConfig } from './translation-module-config.js';
/**
* Partial module configuration for use with config_ref overrides. All fields are optional so that only the modules that should be overridden need to be specified. The remaining configuration is taken from the referenced orchestration config.
*
*/
export type PartialModuleConfigs = {
prompt_templating?: PartialPromptTemplatingModuleConfig;
filtering?: FilteringModuleConfig;
masking?: MaskingModuleConfig;
grounding?: GroundingModuleConfig;
translation?: TranslationModuleConfig;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* 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.
*/
import type { PartialModuleConfigs } from './partial-module-configs.js';
import type { GlobalStreamOptions } from './global-stream-options.js';
/**
* Partial orchestration configuration for use with config_ref overrides. All fields are optional so that only the parts that should be overridden need to be specified. The remaining configuration is taken from the referenced orchestration config.
*
*/
export type PartialOrchestrationConfig = {
modules?: PartialModuleConfigs;
stream?: GlobalStreamOptions;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/
import type { Template } from './template.js';
import type { TemplateRef } from './template-ref.js';
import type { LLMModelDetails } from './llm-model-details.js';
/**
* Partial prompt templating configuration for use with config_ref overrides. model is optional so that only the prompt can be overridden without repeating the model config.
*
*/
export type PartialPromptTemplatingModuleConfig = {
/**
* The prompt template to be used. Can be either a user defined template or a reference to a template in the prompt registry. If omitted, messages_history must be provided in the request body.
*
*/
prompt?: Template | TemplateRef;
model?: LLMModelDetails;
};
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import type { LLMModelDetails } from './llm-model-details.js';
*/
export type PromptTemplatingModuleConfig = {
/**
* The prompt template to be used. Can be either a user defined template or a reference to a template in the prompt registry.
* The prompt template to be used. Can be either a user defined template or a reference to a template in the prompt registry. If omitted, messages_history must be provided in the request body.
*
*/
prompt: Template | TemplateRef;
prompt?: Template | TemplateRef;
model: LLMModelDetails;
};
13 changes: 13 additions & 0 deletions packages/orchestration/src/client/api/schema/reasoning-block.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* 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.
*/

/**
* Representation of the 'ReasoningBlock' schema.
*/
export type ReasoningBlock = {
content?: string;
signature?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import type { MessageToolCalls } from './message-tool-calls.js';
import type { ReasoningBlock } from './reasoning-block.js';
/**
* Representation of the 'ResponseChatMessage' schema.
*/
Expand All @@ -12,4 +13,9 @@ export type ResponseChatMessage = {
content?: string;
refusal?: string;
tool_calls?: MessageToolCalls;
/**
* Reasoning or thinking content generated by the model before the final response.
*
*/
reasoning_content?: ReasoningBlock[];
};
81 changes: 80 additions & 1 deletion packages/orchestration/src/spec/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,12 @@ components:
type: string
tool_calls:
$ref: '#/components/schemas/MessageToolCalls'
reasoning_content:
type: array
items:
$ref: '#/components/schemas/ReasoningBlock'
description: >
Reasoning or thinking content from the model's previous turn.
required:
- role
UserChatMessage:
Expand Down Expand Up @@ -650,6 +656,12 @@ components:
type: string
tool_calls:
$ref: '#/components/schemas/MessageToolCalls'
reasoning_content:
type: array
items:
$ref: '#/components/schemas/ReasoningBlock'
description: >
Reasoning or thinking content generated by the model before the final response.
required:
- role
# below tool message definitions are copied from openai spec: https://github.com/openai/openai-openapi/blob/e0cb2d721753e13e69e918465795d6e9f87ab15a/openapi.yaml#L11007
Expand Down Expand Up @@ -752,6 +764,12 @@ components:
type: array
items:
$ref: '#/components/schemas/ToolCallChunk'
reasoning_content:
type: array
items:
$ref: '#/components/schemas/ReasoningBlock'
description: >
Reasoning or thinking content generated by the model before the final response.
# taken from: https://github.com/openai/openai-openapi/blob/e0cb2d721753e13e69e918465795d6e9f87ab15a/openapi.yaml#L10979C27-L10979C40
ToolCallChunk:
type: object
Expand Down Expand Up @@ -832,6 +850,18 @@ components:
- $ref: '#/components/schemas/ModuleConfigsList'
stream:
$ref: '#/components/schemas/GlobalStreamOptions'
PartialOrchestrationConfig:
description: >
Partial orchestration configuration for use with config_ref overrides. All fields are
optional so that only the parts that should be overridden need to be specified. The
remaining configuration is taken from the referenced orchestration config.
type: object
additionalProperties: false
properties:
modules:
$ref: '#/components/schemas/PartialModuleConfigs'
stream:
$ref: '#/components/schemas/GlobalStreamOptions'
ModuleConfigs:
type: object
required:
Expand All @@ -848,6 +878,24 @@ components:
$ref: '#/components/schemas/GroundingModuleConfig'
translation:
$ref: '#/components/schemas/TranslationModuleConfig'
PartialModuleConfigs:
description: >
Partial module configuration for use with config_ref overrides. All fields are optional
so that only the modules that should be overridden need to be specified. The remaining
configuration is taken from the referenced orchestration config.
type: object
additionalProperties: false
properties:
prompt_templating:
$ref: '#/components/schemas/PartialPromptTemplatingModuleConfig'
filtering:
$ref: '#/components/schemas/FilteringModuleConfig'
masking:
$ref: '#/components/schemas/MaskingModuleConfig'
grounding:
$ref: '#/components/schemas/GroundingModuleConfig'
translation:
$ref: '#/components/schemas/TranslationModuleConfig'
ModuleConfigsList:
type: array
items:
Expand Down Expand Up @@ -1177,13 +1225,29 @@ components:
PromptTemplatingModuleConfig:
type: object
required:
- prompt
- model
additionalProperties: false
properties:
prompt:
description: >
The prompt template to be used. Can be either a user defined template or a reference to a template in the prompt registry.
If omitted, messages_history must be provided in the request body.
oneOf:
- $ref: '#/components/schemas/Template'
- $ref: '#/components/schemas/TemplateRef'
model:
$ref: '#/components/schemas/LLMModelDetails'
PartialPromptTemplatingModuleConfig:
description: >
Partial prompt templating configuration for use with config_ref overrides. model is
optional so that only the prompt can be overridden without repeating the model config.
type: object
additionalProperties: false
properties:
prompt:
description: >
The prompt template to be used. Can be either a user defined template or a reference to a template in the prompt registry.
If omitted, messages_history must be provided in the request body.
oneOf:
- $ref: '#/components/schemas/Template'
- $ref: '#/components/schemas/TemplateRef'
Expand Down Expand Up @@ -2293,6 +2357,8 @@ components:
properties:
config_ref:
$ref: '#/components/schemas/CompletionRequestConfigurationReferenceByIdConfigRef'
config:
$ref: '#/components/schemas/PartialOrchestrationConfig'
placeholder_values:
type: object
example:
Expand Down Expand Up @@ -2324,6 +2390,8 @@ components:
properties:
config_ref:
$ref: '#/components/schemas/CompletionRequestConfigurationReferenceByNameScenarioVersionConfigRef'
config:
$ref: '#/components/schemas/PartialOrchestrationConfig'
placeholder_values:
type: object
example:
Expand Down Expand Up @@ -2351,6 +2419,17 @@ components:
version:
type: string

ReasoningBlock:
type: object
additionalProperties: false
properties:
content:
type: string
default: ''
signature:
type: string
default: ''

responses:
BadRequest:
description: Bad Request
Expand Down
Loading