@takoviz/ai-sdk 2.0.0 → 2.0.1
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 +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ npm install @takoviz/ai-sdk ai
|
|
|
10
10
|
|
|
11
11
|
## Setup
|
|
12
12
|
|
|
13
|
-
Get an API key from the [Tako
|
|
13
|
+
Get an API key from the [Tako developer console](https://developer.tako.com/console/api-keys) and set it as an environment variable:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
export TAKO_API_KEY=your_api_key_here
|
|
@@ -60,7 +60,7 @@ const tools = {
|
|
|
60
60
|
```typescript
|
|
61
61
|
takoSearch({
|
|
62
62
|
apiKey: 'your_api_key', // optional; defaults to TAKO_API_KEY
|
|
63
|
-
baseUrl: 'https://
|
|
63
|
+
baseUrl: 'https://tako.com', // optional; override for staging
|
|
64
64
|
effort: 'fast', // 'fast' (default) | 'instant' | 'deep'
|
|
65
65
|
sources: { // a source is searched iff its key is present; omit to search both
|
|
66
66
|
tako: { count: 5, includeContents: false, deferDataRetrieval: false },
|
|
@@ -81,7 +81,7 @@ takoSearch({
|
|
|
81
81
|
```typescript
|
|
82
82
|
takoContents({
|
|
83
83
|
apiKey: 'your_api_key',
|
|
84
|
-
baseUrl: 'https://
|
|
84
|
+
baseUrl: 'https://tako.com',
|
|
85
85
|
mode: 'url', // 'url' (default) → presigned link; 'inline' → content in the response
|
|
86
86
|
});
|
|
87
87
|
```
|
|
@@ -126,6 +126,6 @@ MIT
|
|
|
126
126
|
|
|
127
127
|
## Links
|
|
128
128
|
|
|
129
|
-
- [Tako documentation](https://docs.
|
|
129
|
+
- [Tako documentation](https://docs.tako.com)
|
|
130
130
|
- [Vercel AI SDK](https://sdk.vercel.ai/docs)
|
|
131
131
|
- [GitHub repository](https://github.com/TakoData/ai-sdk)
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ type TakoKnowledgeCardRelevance = "High" | "Medium" | "Low";
|
|
|
9
9
|
interface TakoBaseConfig {
|
|
10
10
|
/** Tako API key. Falls back to TAKO_API_KEY / TAKO_API_TOKEN env vars. */
|
|
11
11
|
apiKey?: string;
|
|
12
|
-
/** API base URL. Default "https://
|
|
12
|
+
/** API base URL. Default "https://tako.com". */
|
|
13
13
|
baseUrl?: string;
|
|
14
14
|
}
|
|
15
15
|
interface TakoSourceOptions {
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ async function callTako(opts) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// src/request.ts
|
|
36
|
-
var DEFAULT_BASE_URL = "https://
|
|
36
|
+
var DEFAULT_BASE_URL = "https://tako.com";
|
|
37
37
|
function resolveApiKey(config) {
|
|
38
38
|
return config.apiKey ?? process.env.TAKO_API_KEY ?? process.env.TAKO_API_TOKEN;
|
|
39
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takoviz/ai-sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Tako knowledge search, answer, and contents tools for the Vercel AI SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"author": "Tako",
|
|
28
28
|
"license": "MIT",
|
|
29
|
-
"homepage": "https://
|
|
29
|
+
"homepage": "https://tako.com",
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
32
|
"url": "git+https://github.com/TakoData/ai-sdk.git"
|