本次提交对LLM服务进行了全面重构,主要变更包括: - 引入LangChain库,支持多模型提供商(OpenAI、Gemini) - 重构错误处理机制,增加更精细的错误类型 - 优化模型实例缓存和配置验证 - 更新服务层接口,提高代码可读性和可维护性 - 调整模型配置类型,增加provider字段 - 更新单元测试和集成测试,适配新的服务架构 - 添加LangChain相关依赖 重构目标: - 提高代码的可扩展性 - 统一模型调用接口 - 改进错误处理和类型安全 - 支持更多模型提供商
39 lines
981 B
JSON
39 lines
981 B
JSON
{
|
|
"name": "prompt-optimizer-v3",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"test": "vitest",
|
|
"test:ui": "vitest --ui",
|
|
"test:coverage": "vitest run --coverage",
|
|
"test:unit": "vitest run tests/unit"
|
|
},
|
|
"dependencies": {
|
|
"@langchain/anthropic": "^0.3.12",
|
|
"@langchain/core": "^0.3.33",
|
|
"@langchain/google-genai": "^0.1.6",
|
|
"@langchain/openai": "^0.3.17",
|
|
"dotenv": "^16.4.7",
|
|
"js-yaml": "^4.1.0",
|
|
"langchain": "^0.3.12",
|
|
"vue": "^3.5.13"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/forms": "^0.5.10",
|
|
"@tailwindcss/typography": "^0.5.16",
|
|
"@vitejs/plugin-basic-ssl": "^1.2.0",
|
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
"@vue/test-utils": "^2.4.6",
|
|
"autoprefixer": "^10.4.20",
|
|
"jsdom": "^26.0.0",
|
|
"postcss": "^8.5.1",
|
|
"tailwindcss": "^3.4.17",
|
|
"vite": "^6.0.7",
|
|
"vitest": "^3.0.2"
|
|
}
|
|
}
|