|
| 1 | +import path from 'path'; |
| 2 | + |
| 3 | +const aiConfig = { |
| 4 | + /** |
| 5 | + * A dummy embedding function to satisfy the ChromaDB API when embeddings are provided manually. |
| 6 | + * @returns {null} |
| 7 | + */ |
| 8 | + dummyEmbeddingFunction: { |
| 9 | + generate: () => null |
| 10 | + }, |
| 11 | + /** |
| 12 | + * Configuration for the AI agent's persistent memory database. |
| 13 | + */ |
| 14 | + memory: { |
| 15 | + /** |
| 16 | + * The name of the ChromaDB collection for agent memories. |
| 17 | + * @type {string} |
| 18 | + */ |
| 19 | + collectionName: 'neo-agent-memory', |
| 20 | + /** |
| 21 | + * The hostname of the ChromaDB server for agent memory. |
| 22 | + * @type {string} |
| 23 | + */ |
| 24 | + host: 'localhost', |
| 25 | + /** |
| 26 | + * The port the ChromaDB server for agent memory is listening on. |
| 27 | + * @type {number} |
| 28 | + */ |
| 29 | + port: 8001, |
| 30 | + /** |
| 31 | + * The local persistence path for the agent memory server. |
| 32 | + * @type {string} |
| 33 | + */ |
| 34 | + path: path.resolve(process.cwd(), './chroma-memory'), |
| 35 | + /** |
| 36 | + * The path to store memory backups. |
| 37 | + * @type {string} |
| 38 | + */ |
| 39 | + backupPath: path.resolve(process.cwd(), 'dist/memory-backups') |
| 40 | + }, |
| 41 | + /** |
| 42 | + * Configuration for the AI agent's session summary database. |
| 43 | + */ |
| 44 | + sessions: { |
| 45 | + /** |
| 46 | + * The name of the ChromaDB collection for session summaries. |
| 47 | + * @type {string} |
| 48 | + */ |
| 49 | + collectionName: 'neo-agent-sessions', |
| 50 | + /** |
| 51 | + * The hostname of the ChromaDB server for session summaries. |
| 52 | + * @type {string} |
| 53 | + */ |
| 54 | + host: 'localhost', |
| 55 | + /** |
| 56 | + * The port the ChromaDB server for session summaries is listening on. |
| 57 | + * @type {number} |
| 58 | + */ |
| 59 | + port: 8001 |
| 60 | + }, |
| 61 | + /** |
| 62 | + * Configuration for the project's main knowledge base. |
| 63 | + */ |
| 64 | + knowledgeBase: { |
| 65 | + /** |
| 66 | + * The path to the generated knowledge base JSONL file. |
| 67 | + * @type {string} |
| 68 | + */ |
| 69 | + path: path.resolve(process.cwd(), 'dist/ai-knowledge-base.jsonl'), |
| 70 | + /** |
| 71 | + * The name of the ChromaDB collection for the knowledge base. |
| 72 | + * @type {string} |
| 73 | + */ |
| 74 | + collectionName: 'neo_knowledge', |
| 75 | + /** |
| 76 | + * The name of the Google Generative AI model for text embeddings. |
| 77 | + * @type {string} |
| 78 | + */ |
| 79 | + embeddingModel: 'text-embedding-004', |
| 80 | + /** |
| 81 | + * The number of chunks to process in a single batch when embedding. |
| 82 | + * @type {number} |
| 83 | + */ |
| 84 | + batchSize: 100, |
| 85 | + /** |
| 86 | + * The maximum number of times to retry a failed embedding batch. |
| 87 | + * @type {number} |
| 88 | + */ |
| 89 | + maxRetries: 5, |
| 90 | + /** |
| 91 | + * The number of results to fetch from ChromaDB for a query. |
| 92 | + * @type {number} |
| 93 | + */ |
| 94 | + nResults: 100 |
| 95 | + } |
| 96 | +}; |
| 97 | + |
| 98 | +export default aiConfig; |
0 commit comments