tako-sdk 0.1.3 → 0.1.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.
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -116,9 +116,9 @@ var TakoClient = class {
|
|
|
116
116
|
}
|
|
117
117
|
const requestBody = {
|
|
118
118
|
inputs: {
|
|
119
|
-
text
|
|
120
|
-
|
|
121
|
-
}
|
|
119
|
+
text
|
|
120
|
+
},
|
|
121
|
+
...sourceIndexes && sourceIndexes.length > 0 ? { source_indexes: sourceIndexes } : { source_indexes: ["tako" /* TAKO */] }
|
|
122
122
|
};
|
|
123
123
|
const response = await this.request("/knowledge_search", "POST", requestBody);
|
|
124
124
|
return response || { outputs: { knowledge_cards: [] } };
|
package/dist/index.d.cts
CHANGED
|
@@ -12,10 +12,10 @@ interface TakoConfig {
|
|
|
12
12
|
}
|
|
13
13
|
interface KnowledgeSearchInput {
|
|
14
14
|
text: string;
|
|
15
|
-
source_indexes?: SourceIndex[];
|
|
16
15
|
}
|
|
17
16
|
interface KnowledgeSearchRequest {
|
|
18
17
|
inputs: KnowledgeSearchInput;
|
|
18
|
+
source_indexes?: SourceIndex[];
|
|
19
19
|
}
|
|
20
20
|
interface Source {
|
|
21
21
|
source_name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,10 +12,10 @@ interface TakoConfig {
|
|
|
12
12
|
}
|
|
13
13
|
interface KnowledgeSearchInput {
|
|
14
14
|
text: string;
|
|
15
|
-
source_indexes?: SourceIndex[];
|
|
16
15
|
}
|
|
17
16
|
interface KnowledgeSearchRequest {
|
|
18
17
|
inputs: KnowledgeSearchInput;
|
|
18
|
+
source_indexes?: SourceIndex[];
|
|
19
19
|
}
|
|
20
20
|
interface Source {
|
|
21
21
|
source_name: string;
|
package/dist/index.js
CHANGED
|
@@ -86,9 +86,9 @@ var TakoClient = class {
|
|
|
86
86
|
}
|
|
87
87
|
const requestBody = {
|
|
88
88
|
inputs: {
|
|
89
|
-
text
|
|
90
|
-
|
|
91
|
-
}
|
|
89
|
+
text
|
|
90
|
+
},
|
|
91
|
+
...sourceIndexes && sourceIndexes.length > 0 ? { source_indexes: sourceIndexes } : { source_indexes: ["tako" /* TAKO */] }
|
|
92
92
|
};
|
|
93
93
|
const response = await this.request("/knowledge_search", "POST", requestBody);
|
|
94
94
|
return response || { outputs: { knowledge_cards: [] } };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tako-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "JavaScript/TypeScript SDK for the Tako API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,9 +30,6 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/jest": "^29.5.3",
|
|
32
32
|
"@types/node": "^20.4.5",
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
|
34
|
-
"@typescript-eslint/parser": "^6.2.0",
|
|
35
|
-
"eslint": "^8.46.0",
|
|
36
33
|
"jest": "^29.6.2",
|
|
37
34
|
"ts-jest": "^29.1.1",
|
|
38
35
|
"ts-node": "^10.9.2",
|
|
@@ -40,7 +37,10 @@
|
|
|
40
37
|
"typescript": "^5.1.6"
|
|
41
38
|
},
|
|
42
39
|
"peerDependencies": {
|
|
43
|
-
"typescript": ">=4.7.0"
|
|
40
|
+
"typescript": ">=4.7.0",
|
|
41
|
+
"eslint": "^7.0.0 || ^8.0.0",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0",
|
|
43
|
+
"@typescript-eslint/parser": "^5.0.0 || ^6.0.0"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=14.0.0"
|