@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.
- package/README.md +147 -0
- package/dist/composables/useTabularIntelligence.d.ts +13 -1
- package/dist/composables/useTabularIntelligence.d.ts.map +1 -1
- package/dist/core/TabularIntelligence.d.ts +61 -2
- package/dist/core/TabularIntelligence.d.ts.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1008 -191
- package/dist/index.mjs.map +1 -1
- package/dist/tabular-intelligence.css +1 -0
- package/dist/types/index.d.ts +109 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/apiClient.d.ts +27 -0
- package/dist/utils/apiClient.d.ts.map +1 -0
- package/dist/utils/postmanParser.d.ts +97 -0
- package/dist/utils/postmanParser.d.ts.map +1 -0
- package/dist/utils/qaEngine.d.ts +61 -0
- package/dist/utils/qaEngine.d.ts.map +1 -0
- package/dist/utils/tableExtractor.d.ts +14 -0
- package/dist/utils/tableExtractor.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -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