@aigne/example-mcp-sqlite 1.17.8 → 1.18.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/index.ts +4 -2
- package/package.json +7 -6
- package/usages.ts +1 -1
package/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env bunwrapper
|
|
2
2
|
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
-
import { DefaultMemory } from "@aigne/agent-library/default-memory/index.js";
|
|
5
4
|
import { runWithAIGNE } from "@aigne/cli/utils/run-with-aigne.js";
|
|
6
5
|
import { AIAgent, MCPAgent, PromptBuilder } from "@aigne/core";
|
|
6
|
+
import { DefaultMemory } from "@aigne/default-memory";
|
|
7
7
|
|
|
8
8
|
await runWithAIGNE(
|
|
9
9
|
async () => {
|
|
@@ -17,7 +17,9 @@ await runWithAIGNE(
|
|
|
17
17
|
],
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
const prompt = await sqlite.prompts["mcp-demo"]?.invoke({
|
|
20
|
+
const prompt = await sqlite.prompts["mcp-demo"]?.invoke({
|
|
21
|
+
topic: "product service",
|
|
22
|
+
});
|
|
21
23
|
if (!prompt) throw new Error("Prompt mcp-demo not found");
|
|
22
24
|
|
|
23
25
|
const agent = AIAgent.from({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/example-mcp-sqlite",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "A demonstration of using AIGNE Framework and Sqlite MCP Server to interact with a SQLite database",
|
|
5
5
|
"author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
|
|
6
6
|
"homepage": "https://github.com/AIGNE-io/aigne-framework/tree/main/examples/mcp-sqlite",
|
|
@@ -16,14 +16,15 @@
|
|
|
16
16
|
"README.md"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@aigne/
|
|
20
|
-
"@aigne/
|
|
21
|
-
"@aigne/
|
|
22
|
-
"@aigne/
|
|
19
|
+
"@aigne/agent-library": "^1.21.0",
|
|
20
|
+
"@aigne/cli": "^1.23.0",
|
|
21
|
+
"@aigne/default-memory": "^1.0.0",
|
|
22
|
+
"@aigne/core": "^1.34.0",
|
|
23
|
+
"@aigne/openai": "^0.10.0"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@types/bun": "^1.2.18",
|
|
26
|
-
"@aigne/test-utils": "^0.5.
|
|
27
|
+
"@aigne/test-utils": "^0.5.8"
|
|
27
28
|
},
|
|
28
29
|
"scripts": {
|
|
29
30
|
"start": "bun run index.ts",
|
package/usages.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import assert from "node:assert";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { DefaultMemory } from "@aigne/agent-library/default-memory/index.js";
|
|
4
3
|
import { AIAgent, AIGNE, MCPAgent } from "@aigne/core";
|
|
4
|
+
import { DefaultMemory } from "@aigne/default-memory";
|
|
5
5
|
import { OpenAIChatModel } from "@aigne/openai";
|
|
6
6
|
|
|
7
7
|
const { OPENAI_API_KEY } = process.env;
|