Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update to Orchestration v0.48.2 #468

Merged
merged 2 commits into from
Jan 17, 2025
Merged
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
5 changes: 5 additions & 0 deletions .changeset/big-mayflies-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sap-ai-sdk/orchestration': minor
---

Update orchestration to 2501a release.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { AzureContentSafety } from './azure-content-safety.js';
*/
export type AzureContentSafetyFilterConfig = {
/**
* String represents name of the filter provider
* Name of the filter provider type
* @example "azure_content_safety"
*/
type: 'azure_content_safety';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2025 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 { FunctionObject } from './function-object.js';
/**
* Representation of the 'ChatCompletionTool' schema.
*/
export type ChatCompletionTool = {
/**
* The type of the tool. Currently, only `function` is supported.
*/
type: 'function';
function: FunctionObject;
};
7 changes: 6 additions & 1 deletion packages/orchestration/src/client/api/schema/chat-delta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/

import type { ToolCallChunk } from './tool-call-chunk.js';
/**
* Representation of the 'ChatDelta' schema.
*/
export type ChatDelta = {
role?: string;
content: string;
/**
* The refusal message generated by the model.
*/
refusal?: string;
tool_calls?: ToolCallChunk[];
} & Record<string, any>;
11 changes: 3 additions & 8 deletions packages/orchestration/src/client/api/schema/chat-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/

import type { SingleChatMessage } from './single-chat-message.js';
import type { MultiChatMessage } from './multi-chat-message.js';
/**
* Representation of the 'ChatMessage' schema.
*/
export type ChatMessage = {
/**
* @example "user"
*/
role: string;
content: string;
};
export type ChatMessage = SingleChatMessage | MultiChatMessage;
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import type { ChatMessage } from './chat-message.js';
import type { MultiChatMessage } from './multi-chat-message.js';
/**
* Representation of the 'ChatMessages' schema.
*/
export type ChatMessages = (ChatMessage | MultiChatMessage)[];
export type ChatMessages = ChatMessage[];
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
*/

/**
* Representation of the 'DataRepositoryType' schema.
* Only include DataRepositories with the given type.
*/
export type DataRepositoryType = 'vector' | any;
export type DataRepositoryType = 'vector' | 'help.sap.com' | any;
2 changes: 1 addition & 1 deletion packages/orchestration/src/client/api/schema/dpi-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ export type DpiConfig = {
* controls whether the input to the grounding module will be masked with the configuration supplied in the masking module
*/
enabled?: boolean;
} & Record<string, any>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import type { AzureContentSafetyFilterConfig } from './azure-content-safety-filter-config.js';
import type { LlamaGuard38BFilterConfig } from './llama-guard-38-b-filter-config.js';
/**
* Representation of the 'FilterConfig' schema.
*/
export type FilterConfig = AzureContentSafetyFilterConfig;
export type FilterConfig =
| AzureContentSafetyFilterConfig
| LlamaGuard38BFilterConfig;
24 changes: 24 additions & 0 deletions packages/orchestration/src/client/api/schema/function-object.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2025 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 { FunctionParameters } from './function-parameters.js';
/**
* Representation of the 'FunctionObject' schema.
*/
export type FunctionObject = {
/**
* A description of what the function does, used by the model to choose when and how to call the function.
*/
description?: string;
/**
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
*/
name: string;
parameters?: FunctionParameters;
/**
* Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).
*/
strict?: boolean | null;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright (c) 2025 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/

/**
* The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.
*/
export type FunctionParameters = Record<string, any>;
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export type GroundingFilterSearchConfiguration = {
/**
* Maximum number of chunks to be returned. Cannot be used with 'maxDocumentCount'.
*/
max_chunk_count?: number | null;
max_chunk_count?: number;
/**
* [Only supports 'vector' dataRepositoryType] - Maximum number of documents to be returned. Cannot be used with 'maxChunkCount'. If maxDocumentCount is given, then only one chunk per document is returned.
*/
max_document_count?: number | null;
} | null;
max_document_count?: number;
};
4 changes: 2 additions & 2 deletions packages/orchestration/src/client/api/schema/image-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export type ImageContent = {
* Default: "auto".
*/
detail?: string;
} & Record<string, any>;
} & Record<string, any>;
};
};
16 changes: 15 additions & 1 deletion packages/orchestration/src/client/api/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
export * from './completion-post-request.js';
export * from './chat-message.js';
export * from './chat-messages.js';
export * from './templating-chat-message.js';
export * from './chat-message.js';
export * from './single-chat-message.js';
export * from './response-chat-message.js';
export * from './response-message-tool-calls.js';
export * from './response-message-tool-call.js';
export * from './multi-chat-message.js';
export * from './multi-chat-message-content.js';
export * from './text-content.js';
export * from './image-content.js';
export * from './chat-delta.js';
export * from './tool-call-chunk.js';
export * from './completion-post-response.js';
export * from './completion-post-response-streaming.js';
export * from './orchestration-config.js';
Expand All @@ -28,6 +33,13 @@ export * from './llm-choice-streaming.js';
export * from './token-usage.js';
export * from './templating-module-config.js';
export * from './template.js';
export * from './response-format-text.js';
export * from './response-format-json-object.js';
export * from './response-format-json-schema.js';
export * from './response-format-json-schema-schema.js';
export * from './chat-completion-tool.js';
export * from './function-object.js';
export * from './function-parameters.js';
export * from './template-ref.js';
export * from './template-ref-by-id.js';
export * from './template-ref-by-scenario-name-version.js';
Expand All @@ -39,6 +51,8 @@ export * from './filter-config.js';
export * from './azure-content-safety-filter-config.js';
export * from './azure-content-safety.js';
export * from './azure-threshold.js';
export * from './llama-guard-38-b-filter-config.js';
export * from './llama-guard-38-b.js';
export * from './masking-module-config.js';
export * from './masking-provider-config.js';
export * from './dpi-config.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2025 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 { LlamaGuard38B } from './llama-guard-38-b.js';
/**
* Representation of the 'LlamaGuard38BFilterConfig' schema.
*/
export type LlamaGuard38BFilterConfig = {
/**
* Name of the filter provider type
* @example "llama_guard_3_8b"
*/
type: 'llama_guard_3_8b';
config: LlamaGuard38B;
} & Record<string, any>;
25 changes: 25 additions & 0 deletions packages/orchestration/src/client/api/schema/llama-guard-38-b.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2025 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/

/**
* Filter configuration for Llama Guard 3 8B
*/
export type LlamaGuard38B = {
violent_crimes?: boolean;
non_violent_crimes?: boolean;
sex_crimes?: boolean;
child_exploitation?: boolean;
defamation?: boolean;
specialized_advice?: boolean;
privacy?: boolean;
intellectual_property?: boolean;
indiscriminate_weapons?: boolean;
hate?: boolean;
self_harm?: boolean;
sexual_content?: boolean;
elections?: boolean;
code_interpreter_abuse?: boolean;
};
4 changes: 2 additions & 2 deletions packages/orchestration/src/client/api/schema/llm-choice.ts
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 { ChatMessage } from './chat-message.js';
import type { ResponseChatMessage } from './response-chat-message.js';
/**
* Representation of the 'LlmChoice' schema.
*/
Expand All @@ -12,7 +12,7 @@ export type LlmChoice = {
* Index of the choice
*/
index: number;
message: ChatMessage;
message: ResponseChatMessage;
/**
* Log probabilities
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export type MultiChatMessage = {
*/
role: string;
content: MultiChatMessageContent[];
} & Record<string, any>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2025 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 { SingleChatMessage } from './single-chat-message.js';
import type { ResponseMessageToolCalls } from './response-message-tool-calls.js';
/**
* Representation of the 'ResponseChatMessage' schema.
*/
export type ResponseChatMessage = SingleChatMessage & {
/**
* @example "I'm sorry, I can't answer that question."
*/
refusal?: string;
tool_calls?: ResponseMessageToolCalls;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2025 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 'ResponseFormatJsonObject' schema.
*/
export type ResponseFormatJsonObject = {
/**
* The type of response format being defined: `json_object`
*/
type: 'json_object';
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright (c) 2025 SAP SE or an SAP affiliate company. All rights reserved.
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/

/**
* The schema for the response format, described as a JSON Schema object.
*/
export type ResponseFormatJsonSchemaSchema = Record<string, any>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2025 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 { ResponseFormatJsonSchemaSchema } from './response-format-json-schema-schema.js';
/**
* Representation of the 'ResponseFormatJsonSchema' schema.
*/
export type ResponseFormatJsonSchema = {
/**
* The type of response format being defined: `json_schema`
*/
type: 'json_schema';
json_schema: {
/**
* A description of what the response format is for, used by the model to determine how to respond in the format.
*/
description?: string;
/**
* The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
*/
name: string;
schema?: ResponseFormatJsonSchemaSchema;
/**
* Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
*/
strict?: boolean | null;
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2025 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 'ResponseFormatText' schema.
*/
export type ResponseFormatText = {
/**
* The type of response format being defined: `text`
*/
type: 'text';
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2025 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 'ResponseMessageToolCall' schema.
*/
export type ResponseMessageToolCall = {
/**
* The ID of the tool call.
*/
id: string;
/**
* The type of the tool. Currently, only `function` is supported.
*/
type: 'function';
/**
* The function that the model called.
*/
function: {
/**
* The name of the function to call.
*/
name: string;
/**
* The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
*/
arguments: string;
} & Record<string, any>;
} & Record<string, any>;
Loading
Loading