- 新增 TemplateProcessor 类实现模板处理功能 - 更新 PromptService 以支持高级模板 - 修改 Template 类增加 MessageTemplate 类型 - 优化迭代模板以支持变量替换 - 增加模板验证和错误处理
41 lines
1.0 KiB
JSON
41 lines
1.0 KiB
JSON
{
|
|
"name": "@prompt-optimizer/core",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "./dist/index.js",
|
|
"module": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js",
|
|
"require": "./dist/index.cjs"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"test:unit": "vitest run tests/unit",
|
|
"test:integration": "vitest run tests/integration"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^20.11.0",
|
|
"dotenv": "^16.4.7",
|
|
"tsup": "^8.0.2",
|
|
"typescript": "^5.3.3",
|
|
"vitest": "^3.0.2"
|
|
},
|
|
"dependencies": {
|
|
"@google/generative-ai": "^0.21.0",
|
|
"@types/handlebars": "^4.1.0",
|
|
"dexie": "^4.0.11",
|
|
"handlebars": "^4.7.8",
|
|
"openai": "^4.83.0",
|
|
"uuid": "^11.0.5",
|
|
"zod": "^3.22.4"
|
|
}
|
|
} |