@encodeagent/platform-helper-util 1.2509.1071451 → 1.2509.1142206

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ai/llm.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * This file is proprietary and confidential.
17
17
  */
18
18
  import { IKey, IService } from "../types";
19
- import { TLLMPromptParameter, TLLMParameters, ILLMParameters, TLLMMessage, TLLMRequest, TPromptContent, TAIContext } from "./types";
19
+ import { TLLMPromptParameter, TLLMParameters, ILLMParameters, TLLMMessage, TLLMRequest, TPromptContent, TAiContext } from "./types";
20
20
  import { ICalculateCostProps } from "../cost";
21
21
  /**
22
22
  * Gets the runtime identifier for an AI model based on the platform
@@ -30,7 +30,7 @@ export type TCalculateCostProps = {
30
30
  outputTokens?: number;
31
31
  } & ICalculateCostProps;
32
32
  export type TLLMRequestProps = ILLMParameters & {
33
- context: TAIContext;
33
+ context: TAiContext;
34
34
  aiKey: IKey;
35
35
  messages?: TLLMMessage[];
36
36
  tools?: Record<string, any>[];
@@ -45,7 +45,7 @@ export type TLLMRequestProps = ILLMParameters & {
45
45
  */
46
46
  export declare const getLLMRequest: (props: TLLMRequestProps) => TLLMRequest;
47
47
  export type TLLMParametersProps = {
48
- context: TAIContext;
48
+ context: TAiContext;
49
49
  modelId: string;
50
50
  maxTokens?: number;
51
51
  temperature?: number;
@@ -57,7 +57,7 @@ export type TLLMParametersProps = {
57
57
  * Validates and constructs LLM parameters with proper defaults and constraints
58
58
  * @param props - The parameter properties including context, model ID, and optional settings
59
59
  * @returns Validated LLM parameters with applied defaults and constraints
60
- * @throws Error if the AI service for the specified model ID doesn't exist
60
+ * @throws Error if the Ai service for the specified model ID doesn't exist
61
61
  */
62
62
  export declare const getLLMParameters: (props: TLLMParametersProps) => TLLMParameters;
63
63
  export type TGetLLMPromptResult = {
@@ -75,7 +75,7 @@ export type TGetLLMPromptResult = {
75
75
  export declare const preProcessLLMPromptParameters: (parameters: TLLMPromptParameter[]) => TLLMPromptParameter[];
76
76
  export type TOutputFormat = "any" | "markdown" | "plain-text" | "html" | "json" | "xml" | "number";
77
77
  export type TGetLLMPrompt = {
78
- aiContext: TAIContext;
78
+ aiContext: TAiContext;
79
79
  modelId: string;
80
80
  visionId?: string;
81
81
  template: string;
package/dist/ai/llm.js CHANGED
@@ -49,7 +49,7 @@ exports.getLLMRuntime = getLLMRuntime;
49
49
  */
50
50
  const getLLMRequest = (props) => {
51
51
  const { modelId, stream, maxTokens, aiKey, context, tools } = props;
52
- const aiService = (0, model_1.getAIService)(context, modelId);
52
+ const aiService = (0, model_1.getAiService)(context, modelId);
53
53
  if (!aiService) {
54
54
  throw `ai-service-not-exist-${modelId}`;
55
55
  }
@@ -110,13 +110,13 @@ const getLLMRequest = (props) => {
110
110
  gptMessages.push({ role: "user", content: prompt.user });
111
111
  }
112
112
  const mediaContentList = [];
113
- const mediaToAIList = [];
113
+ const mediaToAiList = [];
114
114
  if (prompt.medias && prompt.medias.length > 0) {
115
115
  (0, lodash_1.each)(prompt.medias, (media) => {
116
116
  switch (media.type) {
117
117
  case "image": {
118
118
  const visionService = media.modelId
119
- ? (0, model_1.getAIService)(context, media.modelId) ?? aiService
119
+ ? (0, model_1.getAiService)(context, media.modelId) ?? aiService
120
120
  : aiService;
121
121
  if (aiService.runtime == visionService.runtime) {
122
122
  mediaContentList.push({
@@ -125,7 +125,7 @@ const getLLMRequest = (props) => {
125
125
  });
126
126
  }
127
127
  else {
128
- mediaToAIList.push({
128
+ mediaToAiList.push({
129
129
  type: "image_to_ai",
130
130
  modelId: visionService.id,
131
131
  url: media.content
@@ -150,14 +150,14 @@ const getLLMRequest = (props) => {
150
150
  ...mediaContentList
151
151
  ];
152
152
  }
153
- if (mediaToAIList.length > 0) {
153
+ if (mediaToAiList.length > 0) {
154
154
  //append a new last message with the user prompt
155
155
  const lastMessage = (0, lodash_1.cloneDeep)(gptMessages[gptMessages.length - 1]);
156
156
  lastMessage.type = "media_to_ai_text";
157
157
  gptMessages.pop();
158
158
  gptMessages = [
159
159
  ...gptMessages,
160
- ...mediaToAIList,
160
+ ...mediaToAiList,
161
161
  lastMessage
162
162
  ];
163
163
  }
@@ -201,11 +201,11 @@ exports.getLLMRequest = getLLMRequest;
201
201
  * Validates and constructs LLM parameters with proper defaults and constraints
202
202
  * @param props - The parameter properties including context, model ID, and optional settings
203
203
  * @returns Validated LLM parameters with applied defaults and constraints
204
- * @throws Error if the AI service for the specified model ID doesn't exist
204
+ * @throws Error if the Ai service for the specified model ID doesn't exist
205
205
  */
206
206
  const getLLMParameters = (props) => {
207
207
  const { context, modelId } = props;
208
- const aiService = (0, model_1.getAIService)(context, modelId);
208
+ const aiService = (0, model_1.getAiService)(context, modelId);
209
209
  if (!aiService) {
210
210
  throw `ai-service-not-exist-${modelId}`;
211
211
  }
@@ -1,14 +1,14 @@
1
1
  import { IService } from "../types";
2
- import { TAIContext } from "./types";
3
- export declare const getAIProviders: (context: TAIContext) => Record<string, any>[];
4
- export declare const getAIProvider: (context: TAIContext, id: string) => Record<string, any> | undefined;
5
- export declare const getAIPlatforms: (context: TAIContext) => Record<string, any>[];
6
- export declare const getAIPlatform: (context: TAIContext, id: string) => Record<string, any> | undefined;
7
- export declare const getAIModels: (context: TAIContext, type?: string) => Record<string, any>[];
8
- export declare const getAIModel: (context: TAIContext, id: string, defaultId?: string) => Record<string, any> | undefined;
9
- export declare const getAIServices: (context: TAIContext, type?: string) => IService[];
10
- export declare const getDefaultAIServiceId: (context: TAIContext, type: string) => string;
11
- export declare const getDefaultAIService: (context: TAIContext, type: string) => IService;
12
- export declare const getAIService: (context: TAIContext, id: string, defaultId?: string) => IService | undefined;
13
- export declare const convertAIModelRecordsToAIServices: (records: Record<string, any>[]) => IService[];
2
+ import { TAiContext } from "./types";
3
+ export declare const getAiProviders: (context: TAiContext) => Record<string, any>[];
4
+ export declare const getAiProvider: (context: TAiContext, id: string) => Record<string, any> | undefined;
5
+ export declare const getAiPlatforms: (context: TAiContext) => Record<string, any>[];
6
+ export declare const getAiPlatform: (context: TAiContext, id: string) => Record<string, any> | undefined;
7
+ export declare const getAiModels: (context: TAiContext, type?: string) => Record<string, any>[];
8
+ export declare const getAiModel: (context: TAiContext, id: string, defaultId?: string) => Record<string, any> | undefined;
9
+ export declare const getAiServices: (context: TAiContext, type?: string) => IService[];
10
+ export declare const getDefaultAiServiceId: (context: TAiContext, type: string) => string;
11
+ export declare const getDefaultAiService: (context: TAiContext, type: string) => IService;
12
+ export declare const getAiService: (context: TAiContext, id: string, defaultId?: string) => IService | undefined;
13
+ export declare const convertAiModelRecordsToAiServices: (records: Record<string, any>[]) => IService[];
14
14
  //# sourceMappingURL=model.d.ts.map
package/dist/ai/model.js CHANGED
@@ -1,52 +1,52 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.convertAIModelRecordsToAIServices = exports.getAIService = exports.getDefaultAIService = exports.getDefaultAIServiceId = exports.getAIServices = exports.getAIModel = exports.getAIModels = exports.getAIPlatform = exports.getAIPlatforms = exports.getAIProvider = exports.getAIProviders = void 0;
3
+ exports.convertAiModelRecordsToAiServices = exports.getAiService = exports.getDefaultAiService = exports.getDefaultAiServiceId = exports.getAiServices = exports.getAiModel = exports.getAiModels = exports.getAiPlatform = exports.getAiPlatforms = exports.getAiProvider = exports.getAiProviders = void 0;
4
4
  const lodash_1 = require("lodash");
5
5
  const core_1 = require("../core");
6
6
  const constants_1 = require("../constants");
7
- const getAIProviders = (context) => {
7
+ const getAiProviders = (context) => {
8
8
  const { solution } = context;
9
9
  return solution.ai?.providers ?? [];
10
10
  };
11
- exports.getAIProviders = getAIProviders;
12
- const getAIProvider = (context, id) => {
13
- return (0, lodash_1.find)((0, exports.getAIProviders)(context), (m) => m.value == id);
11
+ exports.getAiProviders = getAiProviders;
12
+ const getAiProvider = (context, id) => {
13
+ return (0, lodash_1.find)((0, exports.getAiProviders)(context), (m) => m.value == id);
14
14
  };
15
- exports.getAIProvider = getAIProvider;
16
- const getAIPlatforms = (context) => {
15
+ exports.getAiProvider = getAiProvider;
16
+ const getAiPlatforms = (context) => {
17
17
  const { solution } = context;
18
18
  return solution.ai?.platforms ?? [];
19
19
  };
20
- exports.getAIPlatforms = getAIPlatforms;
21
- const getAIPlatform = (context, id) => {
22
- return (0, lodash_1.find)((0, exports.getAIPlatforms)(context), (m) => m.value == id);
20
+ exports.getAiPlatforms = getAiPlatforms;
21
+ const getAiPlatform = (context, id) => {
22
+ return (0, lodash_1.find)((0, exports.getAiPlatforms)(context), (m) => m.value == id);
23
23
  };
24
- exports.getAIPlatform = getAIPlatform;
25
- const getAIModels = (context, type) => {
24
+ exports.getAiPlatform = getAiPlatform;
25
+ const getAiModels = (context, type) => {
26
26
  const { solution } = context;
27
27
  const models = solution.ai?.models ?? [];
28
28
  return (0, core_1.isNonEmptyString)(type)
29
29
  ? (0, lodash_1.filter)(models, (m) => m.type == type)
30
30
  : models;
31
31
  };
32
- exports.getAIModels = getAIModels;
33
- const getAIModel = (context, id, defaultId) => {
34
- const models = (0, exports.getAIModels)(context);
32
+ exports.getAiModels = getAiModels;
33
+ const getAiModel = (context, id, defaultId) => {
34
+ const models = (0, exports.getAiModels)(context);
35
35
  let record = (0, lodash_1.find)(models ?? [], (m) => m.value == id);
36
36
  if (!record && (0, core_1.isNonEmptyString)(defaultId)) {
37
37
  record = (0, lodash_1.find)(models ?? [], (m) => m.value == defaultId);
38
38
  }
39
39
  return record;
40
40
  };
41
- exports.getAIModel = getAIModel;
42
- const getAIServices = (context, type) => {
41
+ exports.getAiModel = getAiModel;
42
+ const getAiServices = (context, type) => {
43
43
  const services = context.aiServices ?? [];
44
44
  return (0, core_1.isNonEmptyString)(type)
45
45
  ? (0, lodash_1.filter)(services, (m) => m.type == type)
46
46
  : services;
47
47
  };
48
- exports.getAIServices = getAIServices;
49
- const getDefaultAIServiceId = (context, type) => {
48
+ exports.getAiServices = getAiServices;
49
+ const getDefaultAiServiceId = (context, type) => {
50
50
  const { user, organization, solution } = context;
51
51
  switch (type) {
52
52
  case "vision":
@@ -63,21 +63,21 @@ const getDefaultAIServiceId = (context, type) => {
63
63
  solution.ai?.default?.model?.chat);
64
64
  }
65
65
  };
66
- exports.getDefaultAIServiceId = getDefaultAIServiceId;
67
- const getDefaultAIService = (context, type) => {
68
- return (0, exports.getAIService)(context, (0, exports.getDefaultAIServiceId)(context, type));
66
+ exports.getDefaultAiServiceId = getDefaultAiServiceId;
67
+ const getDefaultAiService = (context, type) => {
68
+ return (0, exports.getAiService)(context, (0, exports.getDefaultAiServiceId)(context, type));
69
69
  };
70
- exports.getDefaultAIService = getDefaultAIService;
71
- const getAIService = (context, id, defaultId) => {
72
- const services = (0, exports.getAIServices)(context);
70
+ exports.getDefaultAiService = getDefaultAiService;
71
+ const getAiService = (context, id, defaultId) => {
72
+ const services = (0, exports.getAiServices)(context);
73
73
  let record = (0, lodash_1.find)(services ?? [], (m) => m.id == id || m.runtime == id || m.refId == id);
74
74
  if (!record && (0, core_1.isNonEmptyString)(defaultId)) {
75
75
  record = (0, lodash_1.find)(services ?? [], (m) => m.id == defaultId || m.refId == defaultId);
76
76
  }
77
77
  return record;
78
78
  };
79
- exports.getAIService = getAIService;
80
- const convertAIModelRecordsToAIServices = (records) => {
79
+ exports.getAiService = getAiService;
80
+ const convertAiModelRecordsToAiServices = (records) => {
81
81
  // if we can not find the model, it may be a model that is retired
82
82
  return (0, lodash_1.map)(records, (record) => {
83
83
  const { id, model, model_data, provider, keyOwner, maxTokensForContext, maxTokensForOutput, name, keyName } = record;
@@ -116,5 +116,5 @@ const convertAIModelRecordsToAIServices = (records) => {
116
116
  return result;
117
117
  });
118
118
  };
119
- exports.convertAIModelRecordsToAIServices = convertAIModelRecordsToAIServices;
119
+ exports.convertAiModelRecordsToAiServices = convertAiModelRecordsToAiServices;
120
120
  //# sourceMappingURL=model.js.map
@@ -1,5 +1,5 @@
1
1
  import { IService } from "../types";
2
- export type TAIContext = {
2
+ export type TAiContext = {
3
3
  solution: Record<string, any>;
4
4
  user?: Record<string, any>;
5
5
  organization?: Record<string, any>;
package/dist/ai/util.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { IContext } from "../types";
2
- import { TAIContext } from "./types";
2
+ import { TAiContext } from "./types";
3
3
  export declare const PLAYGROUND_PROMPT: {
4
4
  entityName: string;
5
5
  entityNameForRenderRecord: string;
@@ -24,5 +24,5 @@ export declare const PLAYGROUND_PROMPT: {
24
24
  supportPlainTextOutput: boolean;
25
25
  supportJSONOutput: boolean;
26
26
  };
27
- export declare const getAIContext: (context: IContext | Record<string, any>) => TAIContext;
27
+ export declare const getAiContext: (context: IContext | Record<string, any>) => TAiContext;
28
28
  //# sourceMappingURL=util.d.ts.map
package/dist/ai/util.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAIContext = exports.PLAYGROUND_PROMPT = void 0;
3
+ exports.getAiContext = exports.PLAYGROUND_PROMPT = void 0;
4
4
  exports.PLAYGROUND_PROMPT = {
5
5
  entityName: "Prompt",
6
6
  entityNameForRenderRecord: "PromptInstance",
@@ -25,7 +25,7 @@ exports.PLAYGROUND_PROMPT = {
25
25
  supportPlainTextOutput: true,
26
26
  supportJSONOutput: true
27
27
  };
28
- const getAIContext = (context) => {
28
+ const getAiContext = (context) => {
29
29
  const { user, organization, aiServices, stage, userId, organizationId, solutionId } = context;
30
30
  const { entities, app, subscriptions, cloudFront, description, searchDisplay, searchContent, ...solution } = context.solution ?? {};
31
31
  return {
@@ -39,5 +39,5 @@ const getAIContext = (context) => {
39
39
  solutionId
40
40
  };
41
41
  };
42
- exports.getAIContext = getAIContext;
42
+ exports.getAiContext = getAiContext;
43
43
  //# sourceMappingURL=util.js.map
package/dist/index.d.ts CHANGED
@@ -44,9 +44,9 @@ export type { TCalculateCostProps } from "./cost";
44
44
  export { roundCostNumber, calculateCost } from "./cost";
45
45
  export type { ICalculateCostProps } from "./cost";
46
46
  export type { TToken, TTokenType, TParseTokenResult } from "./token";
47
- export type { TLLMPromptParameter, ILLMParameters, TLLMParameters, TLLMMessage, TLLMRequest, TMessageContent, TPromptContent, IPluginResult, TAIContext } from "./ai/types";
48
- export { getAIModel, getAIModels, getAIPlatforms, getAIPlatform, getAIProviders, getAIProvider, getAIService, getDefaultAIService, getDefaultAIServiceId, getAIServices, convertAIModelRecordsToAIServices } from "./ai/model";
49
- export { PLAYGROUND_PROMPT, getAIContext } from "./ai/util";
47
+ export type { TLLMPromptParameter, ILLMParameters, TLLMParameters, TLLMMessage, TLLMRequest, TMessageContent, TPromptContent, IPluginResult, TAiContext } from "./ai/types";
48
+ export { getAiModel, getAiModels, getAiPlatforms, getAiPlatform, getAiProviders, getAiProvider, getAiService, getDefaultAiService, getDefaultAiServiceId, getAiServices, convertAiModelRecordsToAiServices } from "./ai/model";
49
+ export { PLAYGROUND_PROMPT, getAiContext } from "./ai/util";
50
50
  export { getLLMRuntime, getLLMRequest, getLLMParameters, preProcessLLMPromptParameters, getLLMPrompt } from "./ai/llm";
51
51
  export type { TLLMRequestProps, TLLMParametersProps, TGetLLMPrompt, TGetLLMPromptResult, TOutputFormat } from "./ai/llm";
52
52
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -21,8 +21,8 @@ exports.convertEnumToArray = exports.sameGuid = exports.cleanGuid = exports.getG
21
21
  exports.D100 = exports.M = exports.K = exports.SURCHARGE = exports.SURCHARGE_TYPE = exports.SURCHARGE_VALUE = exports.CREDIT_EXCHANGE_RATE = exports.GENDERS = exports.LANGUAGES = exports.COUNTRIES = exports.DEFAULT_PASSWORD_RULE = exports.GUID_EMPTY = exports.isValidUrl = exports.getRootDomainFromHost = exports.getRootDomainFromUrl = exports.getBaseDomain = exports.fixUrl = exports.getWebRootUrl = exports.getWebLocation = exports.setWebQueryValue = exports.getWebQueryValue = exports.getBooleanValueOfObject = exports.getPropValueOfObject = exports.getFloatValueOfObject = exports.getArrayPropValueOfObject = exports.getIntValueOfObject = exports.getBooleanPropValue = exports.getObjectPropValue = exports.newShortId = exports.slug = exports.unixTimestamp = exports.newGuid = exports.getObjsDifference = exports.toTitle = exports.wait = exports.isBooleanString = exports.isGoodJSON = exports.parseString = exports.generateBatchArray = exports.calculateSurcharge = exports.convertToOneParagraph = exports.trimNewLine = exports.getLastDayOfTheWeek = exports.getFirstDayOfTheWeek = exports.findGender = exports.findCountry = exports.findLanguage = exports.isFloatString = exports.isIntegerString = exports.isNumberString = void 0;
22
22
  exports.setColorTheme = exports.getColor = exports.ROSE = exports.PINK = exports.FUCHSIA = exports.PURPLE = exports.VIOLET = exports.INDIGO = exports.BLUE = exports.SKY = exports.CYAN = exports.TEAL = exports.EMERALD = exports.GREEN = exports.LIME = exports.YELLOW = exports.AMBER = exports.ORANGE = exports.RED = exports.STONE = exports.NEUTRAL = exports.ZINC = exports.GRAY = exports.SLATE = exports.COLORS = exports.ERROR_HTTP_LIST = exports.ERROR_HTTP_504 = exports.ERROR_HTTP_503 = exports.ERROR_HTTP_502 = exports.ERROR_HTTP_501 = exports.ERROR_HTTP_500 = exports.ERROR_HTTP_429 = exports.ERROR_HTTP_408 = exports.ERROR_HTTP_407 = exports.ERROR_HTTP_406 = exports.ERROR_HTTP_405 = exports.ERROR_HTTP_404 = exports.ERROR_HTTP_403 = exports.ERROR_HTTP_402 = exports.ERROR_HTTP_401 = exports.ERROR_HTTP_400 = exports.ERROR_PERMISSION_DENIED = exports.ERROR_UNEXPECTED = exports.ERROR_AUTH_FAILED = exports.ERROR_NO_ENOUGH_CREDIT = exports.ERROR_TOO_MANY_REQUESTS = exports.ERROR_PARAMETER_INVALID = exports.ERROR_PARAMETER_MISSING = exports.DM = exports.DK = void 0;
23
23
  exports.htmlToMarkdown = exports.markdownToHtml = exports.getRecordFilePath = exports.getContextFromRecord = exports.convertRecordForCreate = exports.getRecordSlug = exports.applyRecordSlug = exports.getRecordPageMetadata = exports.getRecordAddress = exports.getRecordEmailAddress = exports.getRecordFullName = exports.getRecordAbstract = exports.getRecordContentByContentFields = exports.getRecordDisplayByDisplayFields = exports.getRecordContent = exports.getRecordMedia = exports.getRecordDisplay = exports.getRecordEntityFolder = exports.getEntityFolder = exports.fileExtensionInTheList = exports.getFileExtension = exports.getFileNameFromUrl = exports.getAcceptFileExtensions = exports.getAcceptMIMEs = exports.getAcceptExtension = exports.getContentType = exports.getFileType = exports.getFileList = exports.FILE_MS_OFFICE_OLD_LIST = exports.FILE_MS_OFFICE_365_LIST = exports.FILE_ZIP_LIST = exports.FILE_EPUB_LIST = exports.FILE_PDF_LIST = exports.FILE_AUDIO_LIST = exports.FILE_VIDEO_LIST = exports.FILE_IMAGE_LIST = exports.FILE_HTML_LIST = exports.FILE_TXT_LIST = exports.FILE_JSON_LIST = exports.FILE_XML_LIST = exports.FILE_SOURCE_CODE_LIST = exports.FILE_PLAINTEXT_LIST = exports.rgbToHex = exports.hexToRgbaString = exports.hexToRgbString = exports.hexToRgba = exports.hexToRgb = exports.isValidRGB = exports.isValidHex = exports.getColorTheme = void 0;
24
- exports.getAIPlatforms = exports.getAIModels = exports.getAIModel = exports.calculateCost = exports.roundCostNumber = exports.findMainContentElement = exports.processWebPage = exports.getValueBySelector = exports.getImage = exports.getDescription = exports.getContent = exports.getTitle = exports.getCanonical = exports.lowerH = exports.processHtml_Hx = exports.fixHtmlImages = exports.removeHtmlSingleParent = exports.removeHtmlElements = exports.removeHtmlComments = exports.removeHtmlAttributes = exports.cleanHtml = exports.removeHtmlEmptyElements = exports.getTreeItemAndChildrenIds = exports.getTreeItemHavingPropValue = exports.getTreeItemPath = exports.removeTreeItem = exports.replaceTreeItem = exports.insertTreeItem = exports.updateTreeItem = exports.updateAllTreeItems = exports.getTreeItem = exports.hasPrivilege = exports.isAuthor = exports.isReader = exports.checkPrivilege = exports.checkEntityPrivilege = exports.checkPrivileges = exports.hasLicense = exports.checkLicenses = exports.recordOwnedByOrganization = exports.checkRecordPrivilege = exports.hasAnyRole = exports.hasAllRoles = exports.hasRole = exports.hasMemberRole = exports.isOwner = exports.isMember = exports.getEntityTypeFromFileName = exports.getEntity = exports.getEntityBySlug = void 0;
25
- exports.getLLMPrompt = exports.preProcessLLMPromptParameters = exports.getLLMParameters = exports.getLLMRequest = exports.getLLMRuntime = exports.getAIContext = exports.PLAYGROUND_PROMPT = exports.convertAIModelRecordsToAIServices = exports.getAIServices = exports.getDefaultAIServiceId = exports.getDefaultAIService = exports.getAIService = exports.getAIProvider = exports.getAIProviders = exports.getAIPlatform = void 0;
24
+ exports.getAiPlatforms = exports.getAiModels = exports.getAiModel = exports.calculateCost = exports.roundCostNumber = exports.findMainContentElement = exports.processWebPage = exports.getValueBySelector = exports.getImage = exports.getDescription = exports.getContent = exports.getTitle = exports.getCanonical = exports.lowerH = exports.processHtml_Hx = exports.fixHtmlImages = exports.removeHtmlSingleParent = exports.removeHtmlElements = exports.removeHtmlComments = exports.removeHtmlAttributes = exports.cleanHtml = exports.removeHtmlEmptyElements = exports.getTreeItemAndChildrenIds = exports.getTreeItemHavingPropValue = exports.getTreeItemPath = exports.removeTreeItem = exports.replaceTreeItem = exports.insertTreeItem = exports.updateTreeItem = exports.updateAllTreeItems = exports.getTreeItem = exports.hasPrivilege = exports.isAuthor = exports.isReader = exports.checkPrivilege = exports.checkEntityPrivilege = exports.checkPrivileges = exports.hasLicense = exports.checkLicenses = exports.recordOwnedByOrganization = exports.checkRecordPrivilege = exports.hasAnyRole = exports.hasAllRoles = exports.hasRole = exports.hasMemberRole = exports.isOwner = exports.isMember = exports.getEntityTypeFromFileName = exports.getEntity = exports.getEntityBySlug = void 0;
25
+ exports.getLLMPrompt = exports.preProcessLLMPromptParameters = exports.getLLMParameters = exports.getLLMRequest = exports.getLLMRuntime = exports.getAiContext = exports.PLAYGROUND_PROMPT = exports.convertAiModelRecordsToAiServices = exports.getAiServices = exports.getDefaultAiServiceId = exports.getDefaultAiService = exports.getAiService = exports.getAiProvider = exports.getAiProviders = exports.getAiPlatform = void 0;
26
26
  var core_1 = require("./core");
27
27
  Object.defineProperty(exports, "stringToColor", { enumerable: true, get: function () { return core_1.stringToColor; } });
28
28
  Object.defineProperty(exports, "isNonEmptyString", { enumerable: true, get: function () { return core_1.isNonEmptyString; } });
@@ -289,20 +289,20 @@ var cost_1 = require("./cost");
289
289
  Object.defineProperty(exports, "roundCostNumber", { enumerable: true, get: function () { return cost_1.roundCostNumber; } });
290
290
  Object.defineProperty(exports, "calculateCost", { enumerable: true, get: function () { return cost_1.calculateCost; } });
291
291
  var model_1 = require("./ai/model");
292
- Object.defineProperty(exports, "getAIModel", { enumerable: true, get: function () { return model_1.getAIModel; } });
293
- Object.defineProperty(exports, "getAIModels", { enumerable: true, get: function () { return model_1.getAIModels; } });
294
- Object.defineProperty(exports, "getAIPlatforms", { enumerable: true, get: function () { return model_1.getAIPlatforms; } });
295
- Object.defineProperty(exports, "getAIPlatform", { enumerable: true, get: function () { return model_1.getAIPlatform; } });
296
- Object.defineProperty(exports, "getAIProviders", { enumerable: true, get: function () { return model_1.getAIProviders; } });
297
- Object.defineProperty(exports, "getAIProvider", { enumerable: true, get: function () { return model_1.getAIProvider; } });
298
- Object.defineProperty(exports, "getAIService", { enumerable: true, get: function () { return model_1.getAIService; } });
299
- Object.defineProperty(exports, "getDefaultAIService", { enumerable: true, get: function () { return model_1.getDefaultAIService; } });
300
- Object.defineProperty(exports, "getDefaultAIServiceId", { enumerable: true, get: function () { return model_1.getDefaultAIServiceId; } });
301
- Object.defineProperty(exports, "getAIServices", { enumerable: true, get: function () { return model_1.getAIServices; } });
302
- Object.defineProperty(exports, "convertAIModelRecordsToAIServices", { enumerable: true, get: function () { return model_1.convertAIModelRecordsToAIServices; } });
292
+ Object.defineProperty(exports, "getAiModel", { enumerable: true, get: function () { return model_1.getAiModel; } });
293
+ Object.defineProperty(exports, "getAiModels", { enumerable: true, get: function () { return model_1.getAiModels; } });
294
+ Object.defineProperty(exports, "getAiPlatforms", { enumerable: true, get: function () { return model_1.getAiPlatforms; } });
295
+ Object.defineProperty(exports, "getAiPlatform", { enumerable: true, get: function () { return model_1.getAiPlatform; } });
296
+ Object.defineProperty(exports, "getAiProviders", { enumerable: true, get: function () { return model_1.getAiProviders; } });
297
+ Object.defineProperty(exports, "getAiProvider", { enumerable: true, get: function () { return model_1.getAiProvider; } });
298
+ Object.defineProperty(exports, "getAiService", { enumerable: true, get: function () { return model_1.getAiService; } });
299
+ Object.defineProperty(exports, "getDefaultAiService", { enumerable: true, get: function () { return model_1.getDefaultAiService; } });
300
+ Object.defineProperty(exports, "getDefaultAiServiceId", { enumerable: true, get: function () { return model_1.getDefaultAiServiceId; } });
301
+ Object.defineProperty(exports, "getAiServices", { enumerable: true, get: function () { return model_1.getAiServices; } });
302
+ Object.defineProperty(exports, "convertAiModelRecordsToAiServices", { enumerable: true, get: function () { return model_1.convertAiModelRecordsToAiServices; } });
303
303
  var util_1 = require("./ai/util");
304
304
  Object.defineProperty(exports, "PLAYGROUND_PROMPT", { enumerable: true, get: function () { return util_1.PLAYGROUND_PROMPT; } });
305
- Object.defineProperty(exports, "getAIContext", { enumerable: true, get: function () { return util_1.getAIContext; } });
305
+ Object.defineProperty(exports, "getAiContext", { enumerable: true, get: function () { return util_1.getAiContext; } });
306
306
  var llm_1 = require("./ai/llm");
307
307
  Object.defineProperty(exports, "getLLMRuntime", { enumerable: true, get: function () { return llm_1.getLLMRuntime; } });
308
308
  Object.defineProperty(exports, "getLLMRequest", { enumerable: true, get: function () { return llm_1.getLLMRequest; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@encodeagent/platform-helper-util",
3
- "version": "1.2509.1071451",
3
+ "version": "1.2509.1142206",
4
4
  "engines": {
5
5
  "node": ">20.0.0 <23.0.0"
6
6
  },