ai 6.0.91 → 6.0.92
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/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1211,7 +1211,7 @@ var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
|
1211
1211
|
var import_provider_utils4 = require("@ai-sdk/provider-utils");
|
|
1212
1212
|
|
|
1213
1213
|
// src/version.ts
|
|
1214
|
-
var VERSION = true ? "6.0.
|
|
1214
|
+
var VERSION = true ? "6.0.92" : "0.0.0-test";
|
|
1215
1215
|
|
|
1216
1216
|
// src/util/download/download.ts
|
|
1217
1217
|
var download = async ({
|
package/dist/index.mjs
CHANGED
|
@@ -1104,7 +1104,7 @@ import {
|
|
|
1104
1104
|
} from "@ai-sdk/provider-utils";
|
|
1105
1105
|
|
|
1106
1106
|
// src/version.ts
|
|
1107
|
-
var VERSION = true ? "6.0.
|
|
1107
|
+
var VERSION = true ? "6.0.92" : "0.0.0-test";
|
|
1108
1108
|
|
|
1109
1109
|
// src/util/download/download.ts
|
|
1110
1110
|
var download = async ({
|
package/dist/internal/index.js
CHANGED
|
@@ -153,7 +153,7 @@ var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
|
153
153
|
var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
154
154
|
|
|
155
155
|
// src/version.ts
|
|
156
|
-
var VERSION = true ? "6.0.
|
|
156
|
+
var VERSION = true ? "6.0.92" : "0.0.0-test";
|
|
157
157
|
|
|
158
158
|
// src/util/download/download.ts
|
|
159
159
|
var download = async ({
|
package/dist/internal/index.mjs
CHANGED
|
@@ -71,6 +71,7 @@ The open-source community has created the following providers:
|
|
|
71
71
|
- [Voyage AI Provider](/providers/community-providers/voyage-ai) (`voyage-ai-provider`)
|
|
72
72
|
- [Mem0 Provider](/providers/community-providers/mem0) (`@mem0/vercel-ai-provider`)
|
|
73
73
|
- [Letta Provider](/providers/community-providers/letta) (`@letta-ai/vercel-ai-sdk-provider`)
|
|
74
|
+
- [Hindsight Provider](/providers/community-providers/hindsight) (`@vectorize-io/hindsight-ai-sdk`)
|
|
74
75
|
- [Supermemory Provider](/providers/community-providers/supermemory) (`@supermemory/tools`)
|
|
75
76
|
- [Spark Provider](/providers/community-providers/spark) (`spark-ai-provider`)
|
|
76
77
|
- [AnthropicVertex Provider](/providers/community-providers/anthropic-vertex-ai) (`anthropic-vertex-ai`)
|
|
@@ -175,6 +175,39 @@ Supermemory works with any AI SDK provider. The tools give the model `addMemory`
|
|
|
175
175
|
|
|
176
176
|
See the [Supermemory provider documentation](/providers/community-providers/supermemory) for full setup and configuration.
|
|
177
177
|
|
|
178
|
+
### Hindsight
|
|
179
|
+
|
|
180
|
+
[Hindsight](/providers/community-providers/hindsight) provides agents with persistent memory through five tools: `retain`, `recall`, `reflect`, `getMentalModel`, and `getDocument`. It can be self-hosted with Docker or used as a cloud service.
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
pnpm add @vectorize-io/hindsight-ai-sdk @vectorize-io/hindsight-client
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
__PROVIDER_IMPORT__;
|
|
188
|
+
import { HindsightClient } from '@vectorize-io/hindsight-client';
|
|
189
|
+
import { createHindsightTools } from '@vectorize-io/hindsight-ai-sdk';
|
|
190
|
+
import { ToolLoopAgent, stepCountIs } from 'ai';
|
|
191
|
+
import { openai } from '@ai-sdk/openai';
|
|
192
|
+
|
|
193
|
+
const client = new HindsightClient({ baseUrl: process.env.HINDSIGHT_API_URL });
|
|
194
|
+
|
|
195
|
+
const agent = new ToolLoopAgent({
|
|
196
|
+
model: __MODEL__,
|
|
197
|
+
tools: createHindsightTools({ client, bankId: 'user-123' }),
|
|
198
|
+
stopWhen: stepCountIs(10),
|
|
199
|
+
instructions: 'You are a helpful assistant with long-term memory.',
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
const result = await agent.generate({
|
|
203
|
+
prompt: 'Remember that my favorite editor is Neovim',
|
|
204
|
+
});
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
The `bankId` identifies the memory store and is typically a user ID. In multi-user apps, call `createHindsightTools` inside your request handler so each request gets the right bank. Hindsight works with any AI SDK provider.
|
|
208
|
+
|
|
209
|
+
See the [Hindsight provider documentation](/providers/community-providers/hindsight) for full setup and configuration.
|
|
210
|
+
|
|
178
211
|
**When to use memory providers**: these providers are a good fit when you want memory without building any storage infrastructure. The tradeoff is that the provider controls memory behavior, so you have less visibility into what gets stored and how it is retrieved. You also take on a dependency on an external service.
|
|
179
212
|
|
|
180
213
|
## Custom Tool
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.92",
|
|
4
4
|
"description": "AI SDK by Vercel - The AI Toolkit for TypeScript and JavaScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@opentelemetry/api": "1.9.0",
|
|
48
|
-
"@ai-sdk/gateway": "3.0.
|
|
48
|
+
"@ai-sdk/gateway": "3.0.51",
|
|
49
49
|
"@ai-sdk/provider": "3.0.8",
|
|
50
50
|
"@ai-sdk/provider-utils": "4.0.15"
|
|
51
51
|
},
|