Skip to content

Commit

Permalink
chore: Update schema for templates (#276)
Browse files Browse the repository at this point in the history
* update templates

* index
  • Loading branch information
jjtang1985 authored Nov 8, 2024
1 parent c48a161 commit 913bc5a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import { InputFilteringConfig } from './input-filtering-config.js';
import { OutputFilteringConfig } from './output-filtering-config.js';
import type { InputFilteringConfig } from './input-filtering-config.js';
import type { OutputFilteringConfig } from './output-filtering-config.js';
/**
* Representation of the 'FilteringModuleConfig' schema.
*/
export type FilteringModuleConfig = {
/**
* List of provider type and filters.
* List of provider type and filters
*/
input?: InputFilteringConfig;
/**
* List of provider type and filters.
* List of provider type and filters
*/
output?: OutputFilteringConfig;
};
1 change: 1 addition & 0 deletions packages/orchestration/src/client/api/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export * from './llm-module-result.js';
export * from './llm-choice.js';
export * from './token-usage.js';
export * from './templating-module-config.js';
export * from './template.js';
export * from './filtering-module-config.js';
export * from './input-filtering-config.js';
export * from './output-filtering-config.js';
Expand Down
30 changes: 30 additions & 0 deletions packages/orchestration/src/client/api/schema/template.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2024 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 { ChatMessages } from './chat-messages.js';
/**
* Representation of the 'Template' schema.
* @example {
* "template": [
* {
* "role": "user",
* "content": "How can the features of AI in SAP BTP specifially {​{?product}}, be applied to {​{?inputContext}}"
* }
* ],
* "defaults": {
* "inputContext": "The default text that will be used in the template if inputContext is not set"
* }
* }
*/
export type Template = {
/**
* A chat message array to be formatted with values from input_params. Both role and content can be templated. If messages_history is provided, the templated messages will be appended.
*/
template: ChatMessages;
/**
* Optional default values for the template. If a parameter has no default it is required.
*/
defaults?: Record<string, any>;
} & Record<string, any>;
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,8 @@
*
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
*/
import type { ChatMessages } from './chat-messages.js';
import type { Template } from './template.js';
/**
* Representation of the 'TemplatingModuleConfig' schema.
* @example {
* "template": [
* {
* "role": "user",
* "content": "How can the features of AI in SAP BTP specifially {{?groundingOutput}}, be applied to {{?inputContext}}"
* }
* ],
* "defaults": {
* "inputContext": "The default text that will be used in the template if inputContext is not set"
* }
* }
*/
export type TemplatingModuleConfig = {
/**
* A chat message array to be formatted with values from input_params. Both role and content can be templated. If messages_history is provided, the templated messages will be appended.
*/
template: ChatMessages;
/**
* Optional default values for the template. If a parameter has no default it is required.
*/
defaults?: Record<string, any>;
} & Record<string, any>;
export type TemplatingModuleConfig = Template;

0 comments on commit 913bc5a

Please sign in to comment.