mycai 1.0.2 → 1.0.4

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.
@@ -155,7 +155,10 @@ export class TurkishMorphology {
155
155
  // Fiiller (ek kökler)
156
156
  'oku', 'yaz', 'bak', 'çalış', 'ye', 'iç', 'uyu', 'kalk', 'otur', 'koş',
157
157
  'sor', 'söyle', 'dinle', 'bekle', 'başla', 'bitir', 'aç', 'kapat', 'getir', 'götür',
158
- 'koy', 'çıkar', 'kaydet', 'güncelle', 'kontrol'
158
+ 'koy', 'çıkar', 'kaydet', 'güncelle', 'kontrol', 'durdur',
159
+ // Endüstriyel, otomasyon ve mühendislik terimleri
160
+ 'pompa', 'vana', 'motor', 'şalter', 'kazan', 'basınç', 'arıza', 'valf', 'hız', 'boru',
161
+ 'tank', 'fan', 'akım', 'gerilim', 'sıcaklık', 'soğut', 'hararet', 'şebeke', 'sensör', 'şalter'
159
162
  ];
160
163
  }
161
164
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mycai",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Sovereign Air-Gapped Cognitive AI & Embedded Intent Engine for Turkish NLP and Industrial Automation",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -47,6 +47,7 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "express": "^4.19.2",
50
+ "mycai": "^1.0.3",
50
51
  "xlsx": "^0.18.5"
51
52
  }
52
53
  }
package/sdk/ingestion.js CHANGED
@@ -25,25 +25,30 @@ export class IngestionEngine {
25
25
  * @returns {Promise<{ success: boolean, records: Array<{ query: string, content: string, confidence: number }>, stats: Object }>}
26
26
  */
27
27
  async ingest(input) {
28
- if (!input || !input.data) {
29
- throw new Error('Ingest input requires a valid "data" field');
28
+ if (!input) {
29
+ throw new Error('Ingest input requires a valid document or string');
30
30
  }
31
31
 
32
- const type = (input.type || this._detectType(input)).toLowerCase();
33
- const title = input.title || 'Belge';
34
- const metadata = input.metadata || {};
32
+ const payloadData = typeof input === 'string' ? input : (input.data || input.content || input.text);
33
+ if (!payloadData) {
34
+ throw new Error('Ingest input requires a valid "data", "content", or "text" field');
35
+ }
36
+
37
+ const type = (typeof input === 'object' && input.type ? input.type : this._detectType({ data: payloadData })).toLowerCase();
38
+ const title = (typeof input === 'object' && input.title) ? input.title : 'Belge';
39
+ const metadata = (typeof input === 'object' && input.metadata) ? input.metadata : {};
35
40
 
36
41
  switch (type) {
37
42
  case 'pdf':
38
- return await this.ingestPdf(input.data, title, metadata);
43
+ return await this.ingestPdf(payloadData, title, metadata);
39
44
  case 'csv':
40
45
  case 'tsv':
41
- return this.ingestCsv(input.data, title, metadata);
46
+ return this.ingestCsv(payloadData, title, metadata);
42
47
  case 'url':
43
- return await this.ingestUrl(input.data, title, metadata);
48
+ return await this.ingestUrl(payloadData, title, metadata);
44
49
  case 'text':
45
50
  default:
46
- return this.ingestText(input.data, title, metadata);
51
+ return this.ingestText(payloadData, title, metadata);
47
52
  }
48
53
  }
49
54
 
@@ -136,6 +136,13 @@ export class ResonanceEngine {
136
136
  return this;
137
137
  }
138
138
 
139
+ /**
140
+ * Alias for ask() to support standard query terminology
141
+ */
142
+ async query(prompt, options = {}) {
143
+ return this.ask(prompt, options);
144
+ }
145
+
139
146
  /**
140
147
  * Universal Question / Answering / Command Dispatcher (< 0.1ms - 3ms)
141
148
  * @param {string} prompt - User input query