UNPKG

@convo-lang/convo-lang

Version:
47 lines 2.71 kB
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 convoImportMatchRegKey = Symbol('convoImportMatchRegKey'); 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 convoScopeMsgKey = Symbol('convoScopeMsgKey'); export const convoScopeLocationMsgKey = Symbol('convoScopeLocationMsgKey'); 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 allConvoReasoningEffort = ['min', 'minimal', 'low', 'md', 'medium', 'high']; export const isConvoReasoningEffort = (value) => allConvoReasoningEffort.includes(value); export const allConvoResponseVerbosity = ['low', 'md', 'medium', 'high']; export const isConvoResponseVerbosity = (value) => allConvoResponseVerbosity.includes(value); export const isConvoPipeTarget = (value) => { return (typeof value?.convoPipeSink) === 'function'; }; export const allConvoModelCapability = ['text', 'image', 'audio', 'video', 'embedding']; export const allConvoMessageModification = [ 'replace', 'replaceForModel', 'append', 'prepend', 'prefix', 'suffix', 'appendSystem', 'appendUser', 'appendAssistant', ]; export const allConvoMessageModificationAction = [...allConvoMessageModification, 'respond']; export const isConvoMessageModification = (value) => allConvoMessageModification.includes(value); export const isConvoMessageModificationAction = (value) => allConvoMessageModificationAction.includes(value); //# sourceMappingURL=convo-types.js.map