diff --git a/packages/orchestration/src/client/api/schema/llm-module-result.ts b/packages/orchestration/src/client/api/schema/llm-module-result.ts index a7c2ad01..132dd040 100644 --- a/packages/orchestration/src/client/api/schema/llm-module-result.ts +++ b/packages/orchestration/src/client/api/schema/llm-module-result.ts @@ -3,40 +3,11 @@ * * This is a generated file powered by the SAP Cloud SDK for JavaScript. */ -import type { LlmChoice } from './llm-choice.js'; -import type { TokenUsage } from './token-usage.js'; +import type { LLMModuleResultSynchronous } from './llm-module-result-synchronous.js'; +import type { LLMModuleResultStreaming } from './llm-module-result-streaming.js'; /** * Output of LLM module. Follows the OpenAI spec. */ -export type LlmModuleResult = { - /** - * ID of the response. - * @example "chatcmpl-9rO0aLoPKY7RtqkWi1317bazHEVFr" - */ - id: string; - /** - * Object type. - * @example "chat.completion" - */ - object: string; - /** - * Unix timestamp. - * @example 1722510700 - */ - created: number; - /** - * Model name. - * @example "gpt-4" - */ - model: string; - /** - * System fingerprint. - * @example "fp_44709d6fcb" - */ - system_fingerprint?: string; - /** - * Choices. - */ - choices: LlmChoice[]; - usage: TokenUsage; -} & Record; +export type LlmModuleResult = + | LLMModuleResultSynchronous + | LLMModuleResultStreaming; diff --git a/packages/orchestration/src/client/api/schema/module-results.ts b/packages/orchestration/src/client/api/schema/module-results.ts index fb390793..9fd86a28 100644 --- a/packages/orchestration/src/client/api/schema/module-results.ts +++ b/packages/orchestration/src/client/api/schema/module-results.ts @@ -3,10 +3,11 @@ * * This is a generated file powered by the SAP Cloud SDK for JavaScript. */ -import type { GenericModuleResult } from './generic-module-result.js'; import type { ChatMessages } from './chat-messages.js'; +import type { GenericModuleResult } from './generic-module-result.js'; import type { LlmModuleResult } from './llm-module-result.js'; import type { LlmChoice } from './llm-choice.js'; +import type { LLMChoiceStreaming } from './llm-choice-streaming.js'; /** * Results of each module. */ @@ -16,5 +17,5 @@ export type ModuleResults = { input_filtering?: GenericModuleResult; llm?: LlmModuleResult; output_filtering?: GenericModuleResult; - output_unmasking?: LlmChoice[]; + output_unmasking?: (LlmChoice | LLMChoiceStreaming)[]; }; diff --git a/packages/orchestration/src/client/api/schema/orchestration-config.ts b/packages/orchestration/src/client/api/schema/orchestration-config.ts index 6c5f4bbf..c388ab05 100644 --- a/packages/orchestration/src/client/api/schema/orchestration-config.ts +++ b/packages/orchestration/src/client/api/schema/orchestration-config.ts @@ -4,9 +4,15 @@ * This is a generated file powered by the SAP Cloud SDK for JavaScript. */ import type { ModuleConfigs } from './module-configs.js'; +import type { GlobalStreamOptions } from './global-stream-options.js'; /** * Representation of the 'OrchestrationConfig' schema. */ export type OrchestrationConfig = { module_configurations: ModuleConfigs; + /** + * If true, the response will be streamed back to the client + */ + stream?: boolean; + stream_options?: GlobalStreamOptions; } & Record; diff --git a/packages/orchestration/src/client/api/schema/output-filtering-config.ts b/packages/orchestration/src/client/api/schema/output-filtering-config.ts index 32b66327..25bfdb49 100644 --- a/packages/orchestration/src/client/api/schema/output-filtering-config.ts +++ b/packages/orchestration/src/client/api/schema/output-filtering-config.ts @@ -4,6 +4,7 @@ * This is a generated file powered by the SAP Cloud SDK for JavaScript. */ import type { FilterConfig } from './filter-config.js'; +import type { FilteringStreamOptions } from './filtering-stream-options.js'; /** * Representation of the 'OutputFilteringConfig' schema. */ @@ -13,4 +14,5 @@ export type OutputFilteringConfig = { * Min Items: 1. */ filters: FilterConfig[]; + stream_options?: FilteringStreamOptions; };