@aigne/example-mcp-sqlite 1.3.1 → 1.3.2

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 CHANGED
@@ -109,7 +109,8 @@ The following example demonstrates how to interact with an SQLite database:
109
109
  ```typescript
110
110
  import assert from "node:assert";
111
111
  import { join } from "node:path";
112
- import { AIAgent, OpenAIChatModel, ExecutionEngine, MCPAgent } from "@aigne/core";
112
+ import { AIAgent, ExecutionEngine, MCPAgent } from "@aigne/core";
113
+ import { OpenAIChatModel } from "@aigne/core/models/openai-chat-model.js";
113
114
 
114
115
  const { OPENAI_API_KEY } = process.env;
115
116
  assert(OPENAI_API_KEY, "Please set the OPENAI_API_KEY environment variable");
package/index.ts CHANGED
@@ -2,16 +2,10 @@
2
2
 
3
3
  import assert from "node:assert";
4
4
  import { join } from "node:path";
5
- import {
6
- AIAgent,
7
- ExecutionEngine,
8
- MCPAgent,
9
- OpenAIChatModel,
10
- PromptBuilder,
11
- getMessage,
12
- logger,
13
- runChatLoopInTerminal,
14
- } from "@aigne/core";
5
+ import { AIAgent, ExecutionEngine, MCPAgent, PromptBuilder, getMessage } from "@aigne/core";
6
+ import { OpenAIChatModel } from "@aigne/core/models/openai-chat-model.js";
7
+ import { logger } from "@aigne/core/utils/logger.js";
8
+ import { runChatLoopInTerminal } from "@aigne/core/utils/run-chat-loop.js";
15
9
 
16
10
  const { OPENAI_API_KEY } = process.env;
17
11
  assert(OPENAI_API_KEY, "Please set the OPENAI_API_KEY environment variable");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/example-mcp-sqlite",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
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,9 +16,9 @@
16
16
  "README.md"
17
17
  ],
18
18
  "dependencies": {
19
- "openai": "^4.89.0",
19
+ "openai": "^4.89.1",
20
20
  "zod": "^3.24.2",
21
- "@aigne/core": "^1.3.1"
21
+ "@aigne/core": "^1.5.0"
22
22
  },
23
23
  "scripts": {
24
24
  "start": "npx -y bun run index.ts",
package/usages.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import assert from "node:assert";
2
2
  import { join } from "node:path";
3
- import { AIAgent, ExecutionEngine, MCPAgent, OpenAIChatModel } from "@aigne/core";
3
+ import { AIAgent, ExecutionEngine, MCPAgent } from "@aigne/core";
4
+ import { OpenAIChatModel } from "@aigne/core/models/openai-chat-model.js";
4
5
 
5
6
  const { OPENAI_API_KEY } = process.env;
6
7
  assert(OPENAI_API_KEY, "Please set the OPENAI_API_KEY environment variable");
@@ -11,7 +12,7 @@ const model = new OpenAIChatModel({
11
12
 
12
13
  const sqlite = await MCPAgent.from({
13
14
  command: "uvx",
14
- args: ["-q", "mcp-sqlite", "--db-path", join(process.cwd(), "usages.db")],
15
+ args: ["-q", "mcp-server-sqlite", "--db-path", join(process.cwd(), "usages.db")],
15
16
  });
16
17
 
17
18
  const engine = new ExecutionEngine({