Skip to content

Commit

Permalink
Handle empty casse
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler committed Nov 20, 2024
1 parent 9b8fff8 commit 1baaa5b
Show file tree
Hide file tree
Showing 2 changed files with 190 additions and 160 deletions.
20 changes: 14 additions & 6 deletions common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

import {
InputMapEntry,
MapEntry,
PromptPreset,
QueryPreset,
Expand Down Expand Up @@ -468,6 +469,12 @@ export enum TRANSFORM_CONTEXT {
INPUT = 'input',
OUTPUT = 'output',
}
export enum TRANSFORM_TYPE {
STRING = 'string',
FIELD = 'field',
EXPRESSION = 'expression',
TEMPLATE = 'template',
}
export const START_FROM_SCRATCH_WORKFLOW_NAME = 'Start From Scratch';
export const DEFAULT_NEW_WORKFLOW_NAME = 'new_workflow';
export const DEFAULT_NEW_WORKFLOW_DESCRIPTION = 'My new workflow';
Expand All @@ -493,6 +500,13 @@ export const MAX_JSON_STRING_LENGTH = 10000;
export const MAX_WORKFLOW_NAME_TO_DISPLAY = 40;
export const WORKFLOW_NAME_REGEXP = RegExp('^[a-zA-Z0-9_-]*$');
export const EMPTY_MAP_ENTRY = { key: '', value: '' } as MapEntry;
export const EMPTY_INPUT_MAP_ENTRY = {
key: '',
value: {
transformType: TRANSFORM_TYPE.FIELD,
value: '',
},
} as InputMapEntry;
export const MODEL_OUTPUT_SCHEMA_NESTED_PATH =
'output.properties.inference_results.items.properties.output.items.properties.dataAsMap.properties';
export const MODEL_OUTPUT_SCHEMA_FULL_PATH = 'output.properties';
Expand All @@ -506,9 +520,3 @@ export enum SOURCE_OPTIONS {
UPLOAD = 'upload',
EXISTING_INDEX = 'existing_index',
}
export enum TRANSFORM_TYPE {
STRING = 'string',
FIELD = 'field',
EXPRESSION = 'expression',
TEMPLATE = 'template',
}
Loading

0 comments on commit 1baaa5b

Please sign in to comment.