@aivue/tabular-intelligence 1.0.0 → 1.2.0

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.
@@ -0,0 +1,61 @@
1
+ import { QARequest, QAResponse } from '../types';
2
+ export interface QAEngineConfig {
3
+ provider: 'openai' | 'anthropic' | 'custom';
4
+ apiKey?: string;
5
+ baseUrl?: string;
6
+ model?: string;
7
+ maxTokens?: number;
8
+ temperature?: number;
9
+ }
10
+ /**
11
+ * Q&A Engine for natural language questions about table data
12
+ */
13
+ export declare class QAEngine {
14
+ private config;
15
+ constructor(config: QAEngineConfig);
16
+ /**
17
+ * Answer a question about the table data
18
+ */
19
+ answerQuestion(request: QARequest): Promise<QAResponse>;
20
+ /**
21
+ * Sample data for large datasets
22
+ */
23
+ private sampleData;
24
+ /**
25
+ * Calculate aggregates for numeric columns
26
+ */
27
+ private calculateAggregates;
28
+ /**
29
+ * Get top N most frequent values
30
+ */
31
+ private getTopValues;
32
+ /**
33
+ * Build prompt for LLM
34
+ */
35
+ private buildPrompt;
36
+ /**
37
+ * Call LLM API
38
+ */
39
+ private callLLM;
40
+ /**
41
+ * Call OpenAI API
42
+ */
43
+ private callOpenAI;
44
+ /**
45
+ * Call Anthropic API
46
+ */
47
+ private callAnthropic;
48
+ /**
49
+ * Call custom API
50
+ */
51
+ private callCustomAPI;
52
+ /**
53
+ * Parse LLM response
54
+ */
55
+ private parseResponse;
56
+ /**
57
+ * Generate unique ID
58
+ */
59
+ private generateId;
60
+ }
61
+ //# sourceMappingURL=qaEngine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qaEngine.d.ts","sourceRoot":"","sources":["../../src/utils/qaEngine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAuB,MAAM,UAAU,CAAC;AAG3E,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,MAAM,CAAiB;gBAEnB,MAAM,EAAE,cAAc;IAQlC;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;IA4C7D;;OAEG;IACH,OAAO,CAAC,UAAU;IAelB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAgC3B;;OAEG;IACH,OAAO,CAAC,YAAY;IAapB;;OAEG;IACH,OAAO,CAAC,WAAW;IAiDnB;;OAEG;YACW,OAAO;IAcrB;;OAEG;YACW,UAAU;IAwBxB;;OAEG;YACW,aAAa;IAwB3B;;OAEG;YACW,aAAa;IAuB3B;;OAEG;IACH,OAAO,CAAC,aAAa;IA2BrB;;OAEG;IACH,OAAO,CAAC,UAAU;CAGnB"}
@@ -0,0 +1,14 @@
1
+ import { ExtractedTable, TableExtractionOptions } from '../types';
2
+ /**
3
+ * Extract table data from DOM (HTML tables)
4
+ */
5
+ export declare function extractFromDOM(options?: TableExtractionOptions): ExtractedTable | null;
6
+ /**
7
+ * Normalize Vue data grid data
8
+ */
9
+ export declare function normalizeVueData(data: any[], columns?: Array<{
10
+ field: string;
11
+ header?: string;
12
+ label?: string;
13
+ }>, options?: TableExtractionOptions): ExtractedTable;
14
+ //# sourceMappingURL=tableExtractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tableExtractor.d.ts","sourceRoot":"","sources":["../../src/utils/tableExtractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4B,cAAc,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGjG;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,GAAE,sBAA2B,GAAG,cAAc,GAAG,IAAI,CAuF1F;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,GAAG,EAAE,EACX,OAAO,CAAC,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EACnE,OAAO,GAAE,sBAA2B,GACnC,cAAc,CAuChB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aivue/tabular-intelligence",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Tabular Foundation Model (TFM) integration for structured data analysis in Vue.js",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",