Package Exports
- @flowrag/core
- @flowrag/core/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@flowrag/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@flowrag/core
Interfaces, schema definition, and types for FlowRAG.
Installation
npm install @flowrag/coreUsage
Schema Definition
import { defineSchema } from '@flowrag/core';
const schema = defineSchema({
entityTypes: ['SERVICE', 'DATABASE', 'PROTOCOL'],
relationTypes: ['USES', 'PRODUCES', 'CONSUMES'],
});
schema.isValidEntityType('SERVICE'); // true
schema.normalizeEntityType('UNKNOWN'); // 'Other'Custom Fields
const schema = defineSchema({
entityTypes: ['SERVICE', 'DATABASE'],
relationTypes: ['USES', 'PRODUCES'],
entityFields: {
status: { type: 'enum', values: ['active', 'deprecated'], default: 'active' },
},
relationFields: {
syncType: { type: 'enum', values: ['sync', 'async'] },
},
});Interfaces
KVStorage— key-value storage (documents, chunks, cache)VectorStorage— vector embeddings for semantic searchGraphStorage— knowledge graph (entities, relations, traversal)Embedder— text to vector embeddingsLLMExtractor— entity/relation extraction via LLMReranker— post-retrieval result reranking
License
MIT