@convo-lang/convo-lang
Version:
The language of AI
30 lines • 2.05 kB
JavaScript
export const convoValueConstants = ['true', 'false', 'null', 'undefined'];
export const convoNonFuncKeywords = ['in'];
export const convoObjFlag = '**convo**';
export const allConvoCapabilityAry = ['vision', 'visionFunction'];
export const isConvoCapability = (value) => allConvoCapabilityAry.includes(value);
export const allConvoComponentModeAry = ['render', 'input'];
export const isConvoComponentMode = (value) => allConvoComponentModeAry.includes(value);
export const convoMessageSourcePathKey = Symbol('convoMessageSourcePathKey');
export const baseConvoToolChoice = ['none', 'auto', 'required'];
export const isOptionalConvoValue = (value) => value?.[convoObjFlag] === 'optional';
export const convoFlowControllerKey = Symbol('convoFlowControllerKey');
export const convoScopeFunctionMarker = Symbol('convoScopeFunctionMarker');
export const convoScopeFnKey = Symbol('convoScopeFnKey');
export const convoScopeFnDefKey = Symbol('convoScopeFnDefKey');
export const convoScopeParentKey = Symbol('convoScopeParentKey');
export const convoBaseTypes = ['string', 'number', 'int', 'boolean', 'time', 'void', 'any', 'map', 'array', 'object'];
export const isConvoBaseType = (value) => convoBaseTypes.includes(value);
export const isConvoType = (value) => value?.[convoObjFlag] === 'type';
export const isConvoMarkdownLine = (value) => value?.[convoObjFlag] === 'md';
export const isConvoRagMode = (value) => (value === true ||
value === false ||
(typeof value === 'number'));
export const isConvoPipeTarget = (value) => {
return (typeof value?.convoPipeSink) === 'function';
};
export const allConvoMessageModification = ['replace', 'replaceForModel', 'append', 'prepend', 'prefix', 'suffix'];
export const allConvoMessageModificationAction = [...allConvoMessageModification, 'respond'];
export const isConvoMessageModification = (value) => allConvoMessageModification.includes(value);
export const isConvoMessageModificationAction = (value) => allConvoMessageModificationAction.includes(value);
//# sourceMappingURL=convo-types.js.map