generated from tailored/app-template
	"chore: bump version and update dependencies"
This commit is contained in:
		
							
								
								
									
										18
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								package.json
									
									
									
									
									
								
							@@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "@kevisual/ai-center",
 | 
					  "name": "@kevisual/ai-center",
 | 
				
			||||||
  "version": "0.0.1",
 | 
					  "version": "0.0.3",
 | 
				
			||||||
  "description": "后面需要把ai-center的provider模块提取出去",
 | 
					  "description": "后面需要把ai-center的provider模块提取出去",
 | 
				
			||||||
  "main": "index.js",
 | 
					  "main": "index.js",
 | 
				
			||||||
  "basename": "/root/ai-center-services",
 | 
					  "basename": "/root/ai-center-services",
 | 
				
			||||||
@@ -39,18 +39,10 @@
 | 
				
			|||||||
      "types": "./dist/ai-provider.d.ts"
 | 
					      "types": "./dist/ai-provider.d.ts"
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "dependencies": {},
 | 
					 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "@kevisual/code-center-module": "0.0.18",
 | 
					    "@kevisual/code-center-module": "0.0.18",
 | 
				
			||||||
    "@kevisual/mark": "0.0.7",
 | 
					    "@kevisual/mark": "0.0.7",
 | 
				
			||||||
    "@kevisual/router": "0.0.13",
 | 
					    "@kevisual/router": "0.0.13",
 | 
				
			||||||
    "cookie": "^1.0.2",
 | 
					 | 
				
			||||||
    "crypto-js": "^4.2.0",
 | 
					 | 
				
			||||||
    "dayjs": "^1.11.13",
 | 
					 | 
				
			||||||
    "formidable": "^3.5.4",
 | 
					 | 
				
			||||||
    "json5": "^2.2.3",
 | 
					 | 
				
			||||||
    "lodash-es": "^4.17.21",
 | 
					 | 
				
			||||||
    "openai": "^4.96.0",
 | 
					 | 
				
			||||||
    "@kevisual/types": "^0.0.6",
 | 
					    "@kevisual/types": "^0.0.6",
 | 
				
			||||||
    "@kevisual/use-config": "^1.0.11",
 | 
					    "@kevisual/use-config": "^1.0.11",
 | 
				
			||||||
    "@types/bun": "^1.2.10",
 | 
					    "@types/bun": "^1.2.10",
 | 
				
			||||||
@@ -59,10 +51,18 @@
 | 
				
			|||||||
    "@types/lodash-es": "^4.17.12",
 | 
					    "@types/lodash-es": "^4.17.12",
 | 
				
			||||||
    "@types/node": "^22.15.2",
 | 
					    "@types/node": "^22.15.2",
 | 
				
			||||||
    "@vitejs/plugin-basic-ssl": "^2.0.0",
 | 
					    "@vitejs/plugin-basic-ssl": "^2.0.0",
 | 
				
			||||||
 | 
					    "cookie": "^1.0.2",
 | 
				
			||||||
    "cross-env": "^7.0.3",
 | 
					    "cross-env": "^7.0.3",
 | 
				
			||||||
 | 
					    "crypto-js": "^4.2.0",
 | 
				
			||||||
 | 
					    "dayjs": "^1.11.13",
 | 
				
			||||||
    "dotenv": "^16.5.0",
 | 
					    "dotenv": "^16.5.0",
 | 
				
			||||||
 | 
					    "formidable": "^3.5.4",
 | 
				
			||||||
    "ioredis": "^5.6.1",
 | 
					    "ioredis": "^5.6.1",
 | 
				
			||||||
 | 
					    "json5": "^2.2.3",
 | 
				
			||||||
 | 
					    "lodash-es": "^4.17.21",
 | 
				
			||||||
 | 
					    "openai": "^4.96.0",
 | 
				
			||||||
    "pino": "^9.6.0",
 | 
					    "pino": "^9.6.0",
 | 
				
			||||||
 | 
					    "pino-pretty": "^13.0.0",
 | 
				
			||||||
    "pm2": "^6.0.5",
 | 
					    "pm2": "^6.0.5",
 | 
				
			||||||
    "rimraf": "^6.0.1",
 | 
					    "rimraf": "^6.0.1",
 | 
				
			||||||
    "rollup": "^4.40.0",
 | 
					    "rollup": "^4.40.0",
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										80
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										80
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							@@ -74,6 +74,9 @@ importers:
 | 
				
			|||||||
      pino:
 | 
					      pino:
 | 
				
			||||||
        specifier: ^9.6.0
 | 
					        specifier: ^9.6.0
 | 
				
			||||||
        version: 9.6.0
 | 
					        version: 9.6.0
 | 
				
			||||||
 | 
					      pino-pretty:
 | 
				
			||||||
 | 
					        specifier: ^13.0.0
 | 
				
			||||||
 | 
					        version: 13.0.0
 | 
				
			||||||
      pm2:
 | 
					      pm2:
 | 
				
			||||||
        specifier: ^6.0.5
 | 
					        specifier: ^6.0.5
 | 
				
			||||||
        version: 6.0.5
 | 
					        version: 6.0.5
 | 
				
			||||||
@@ -760,6 +763,9 @@ packages:
 | 
				
			|||||||
  colorette@1.4.0:
 | 
					  colorette@1.4.0:
 | 
				
			||||||
    resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==}
 | 
					    resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  colorette@2.0.20:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  combined-stream@1.0.8:
 | 
					  combined-stream@1.0.8:
 | 
				
			||||||
    resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
 | 
					    resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
 | 
				
			||||||
    engines: {node: '>= 0.8'}
 | 
					    engines: {node: '>= 0.8'}
 | 
				
			||||||
@@ -823,6 +829,9 @@ packages:
 | 
				
			|||||||
    resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==}
 | 
					    resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==}
 | 
				
			||||||
    engines: {node: '>= 0.4'}
 | 
					    engines: {node: '>= 0.4'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  dateformat@4.6.3:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  dayjs@1.11.13:
 | 
					  dayjs@1.11.13:
 | 
				
			||||||
    resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==}
 | 
					    resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -917,6 +926,9 @@ packages:
 | 
				
			|||||||
  emoji-regex@9.2.2:
 | 
					  emoji-regex@9.2.2:
 | 
				
			||||||
    resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
 | 
					    resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  end-of-stream@1.4.4:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  engine.io-parser@5.2.3:
 | 
					  engine.io-parser@5.2.3:
 | 
				
			||||||
    resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==}
 | 
					    resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==}
 | 
				
			||||||
    engines: {node: '>=10.0.0'}
 | 
					    engines: {node: '>=10.0.0'}
 | 
				
			||||||
@@ -1008,6 +1020,9 @@ packages:
 | 
				
			|||||||
  extrareqp2@1.0.0:
 | 
					  extrareqp2@1.0.0:
 | 
				
			||||||
    resolution: {integrity: sha512-Gum0g1QYb6wpPJCVypWP3bbIuaibcFiJcpuPM10YSXp/tzqi84x9PJageob+eN4xVRIOto4wjSGNLyMD54D2xA==}
 | 
					    resolution: {integrity: sha512-Gum0g1QYb6wpPJCVypWP3bbIuaibcFiJcpuPM10YSXp/tzqi84x9PJageob+eN4xVRIOto4wjSGNLyMD54D2xA==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  fast-copy@3.0.2:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fast-glob@3.3.3:
 | 
					  fast-glob@3.3.3:
 | 
				
			||||||
    resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
 | 
					    resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
 | 
				
			||||||
    engines: {node: '>=8.6.0'}
 | 
					    engines: {node: '>=8.6.0'}
 | 
				
			||||||
@@ -1019,6 +1034,9 @@ packages:
 | 
				
			|||||||
    resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==}
 | 
					    resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==}
 | 
				
			||||||
    engines: {node: '>=6'}
 | 
					    engines: {node: '>=6'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  fast-safe-stringify@2.1.1:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fastq@1.19.1:
 | 
					  fastq@1.19.1:
 | 
				
			||||||
    resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==}
 | 
					    resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1192,6 +1210,9 @@ packages:
 | 
				
			|||||||
    resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
 | 
					    resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
 | 
				
			||||||
    engines: {node: '>= 0.4'}
 | 
					    engines: {node: '>= 0.4'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  help-me@5.0.0:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  http-proxy-agent@7.0.2:
 | 
					  http-proxy-agent@7.0.2:
 | 
				
			||||||
    resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}
 | 
					    resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}
 | 
				
			||||||
    engines: {node: '>= 14'}
 | 
					    engines: {node: '>= 14'}
 | 
				
			||||||
@@ -1365,6 +1386,10 @@ packages:
 | 
				
			|||||||
    resolution: {integrity: sha512-9DDdhb5j6cpeitCbvLO7n7J4IxnbM6hoF6O1g4HQ5TfhvvKN8ywDM7668ZhMHRqVmxqhps/F6syWK2KcPxYlkw==}
 | 
					    resolution: {integrity: sha512-9DDdhb5j6cpeitCbvLO7n7J4IxnbM6hoF6O1g4HQ5TfhvvKN8ywDM7668ZhMHRqVmxqhps/F6syWK2KcPxYlkw==}
 | 
				
			||||||
    engines: {node: 20 || >=22}
 | 
					    engines: {node: 20 || >=22}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  joycon@3.1.1:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==}
 | 
				
			||||||
 | 
					    engines: {node: '>=10'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  js-git@0.7.8:
 | 
					  js-git@0.7.8:
 | 
				
			||||||
    resolution: {integrity: sha512-+E5ZH/HeRnoc/LW0AmAyhU+mNcWBzAKE+30+IDMLSLbbK+Tdt02AdkOKq9u15rlJsDEGFqtgckc8ZM59LhhiUA==}
 | 
					    resolution: {integrity: sha512-+E5ZH/HeRnoc/LW0AmAyhU+mNcWBzAKE+30+IDMLSLbbK+Tdt02AdkOKq9u15rlJsDEGFqtgckc8ZM59LhhiUA==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1660,6 +1685,10 @@ packages:
 | 
				
			|||||||
  pino-abstract-transport@2.0.0:
 | 
					  pino-abstract-transport@2.0.0:
 | 
				
			||||||
    resolution: {integrity: sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==}
 | 
					    resolution: {integrity: sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  pino-pretty@13.0.0:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-cQBBIVG3YajgoUjo1FdKVRX6t9XPxwB9lcNJVD5GCnNM4Y6T12YYx8c6zEejxQsU0wrg9TwmDulcE9LR7qcJqA==}
 | 
				
			||||||
 | 
					    hasBin: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  pino-std-serializers@7.0.0:
 | 
					  pino-std-serializers@7.0.0:
 | 
				
			||||||
    resolution: {integrity: sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==}
 | 
					    resolution: {integrity: sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1727,6 +1756,9 @@ packages:
 | 
				
			|||||||
  proxy-from-env@1.1.0:
 | 
					  proxy-from-env@1.1.0:
 | 
				
			||||||
    resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
 | 
					    resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  pump@3.0.2:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  queue-microtask@1.2.3:
 | 
					  queue-microtask@1.2.3:
 | 
				
			||||||
    resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
 | 
					    resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1850,6 +1882,9 @@ packages:
 | 
				
			|||||||
  sax@1.4.1:
 | 
					  sax@1.4.1:
 | 
				
			||||||
    resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==}
 | 
					    resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  secure-json-parse@2.7.0:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  selfsigned@2.4.1:
 | 
					  selfsigned@2.4.1:
 | 
				
			||||||
    resolution: {integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==}
 | 
					    resolution: {integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==}
 | 
				
			||||||
    engines: {node: '>=10'}
 | 
					    engines: {node: '>=10'}
 | 
				
			||||||
@@ -2037,6 +2072,10 @@ packages:
 | 
				
			|||||||
    resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==}
 | 
					    resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==}
 | 
				
			||||||
    engines: {node: '>=12'}
 | 
					    engines: {node: '>=12'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  strip-json-comments@3.1.1:
 | 
				
			||||||
 | 
					    resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
 | 
				
			||||||
 | 
					    engines: {node: '>=8'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  supports-color@7.2.0:
 | 
					  supports-color@7.2.0:
 | 
				
			||||||
    resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
 | 
					    resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
 | 
				
			||||||
    engines: {node: '>=8'}
 | 
					    engines: {node: '>=8'}
 | 
				
			||||||
@@ -2902,6 +2941,8 @@ snapshots:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  colorette@1.4.0: {}
 | 
					  colorette@1.4.0: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  colorette@2.0.20: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  combined-stream@1.0.8:
 | 
					  combined-stream@1.0.8:
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      delayed-stream: 1.0.0
 | 
					      delayed-stream: 1.0.0
 | 
				
			||||||
@@ -2959,6 +3000,8 @@ snapshots:
 | 
				
			|||||||
      es-errors: 1.3.0
 | 
					      es-errors: 1.3.0
 | 
				
			||||||
      is-data-view: 1.0.2
 | 
					      is-data-view: 1.0.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  dateformat@4.6.3: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  dayjs@1.11.13: {}
 | 
					  dayjs@1.11.13: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  dayjs@1.8.36: {}
 | 
					  dayjs@1.8.36: {}
 | 
				
			||||||
@@ -3051,6 +3094,10 @@ snapshots:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  emoji-regex@9.2.2: {}
 | 
					  emoji-regex@9.2.2: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  end-of-stream@1.4.4:
 | 
				
			||||||
 | 
					    dependencies:
 | 
				
			||||||
 | 
					      once: 1.4.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  engine.io-parser@5.2.3: {}
 | 
					  engine.io-parser@5.2.3: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  engine.io@6.6.4:
 | 
					  engine.io@6.6.4:
 | 
				
			||||||
@@ -3224,6 +3271,8 @@ snapshots:
 | 
				
			|||||||
    transitivePeerDependencies:
 | 
					    transitivePeerDependencies:
 | 
				
			||||||
      - debug
 | 
					      - debug
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  fast-copy@3.0.2: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fast-glob@3.3.3:
 | 
					  fast-glob@3.3.3:
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      '@nodelib/fs.stat': 2.0.5
 | 
					      '@nodelib/fs.stat': 2.0.5
 | 
				
			||||||
@@ -3236,6 +3285,8 @@ snapshots:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  fast-redact@3.5.0: {}
 | 
					  fast-redact@3.5.0: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  fast-safe-stringify@2.1.1: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fastq@1.19.1:
 | 
					  fastq@1.19.1:
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      reusify: 1.1.0
 | 
					      reusify: 1.1.0
 | 
				
			||||||
@@ -3425,6 +3476,8 @@ snapshots:
 | 
				
			|||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      function-bind: 1.1.2
 | 
					      function-bind: 1.1.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  help-me@5.0.0: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  http-proxy-agent@7.0.2:
 | 
					  http-proxy-agent@7.0.2:
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      agent-base: 7.1.3
 | 
					      agent-base: 7.1.3
 | 
				
			||||||
@@ -3617,6 +3670,8 @@ snapshots:
 | 
				
			|||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      '@isaacs/cliui': 8.0.2
 | 
					      '@isaacs/cliui': 8.0.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  joycon@3.1.1: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  js-git@0.7.8:
 | 
					  js-git@0.7.8:
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      bodec: 0.1.0
 | 
					      bodec: 0.1.0
 | 
				
			||||||
@@ -3883,6 +3938,22 @@ snapshots:
 | 
				
			|||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      split2: 4.2.0
 | 
					      split2: 4.2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  pino-pretty@13.0.0:
 | 
				
			||||||
 | 
					    dependencies:
 | 
				
			||||||
 | 
					      colorette: 2.0.20
 | 
				
			||||||
 | 
					      dateformat: 4.6.3
 | 
				
			||||||
 | 
					      fast-copy: 3.0.2
 | 
				
			||||||
 | 
					      fast-safe-stringify: 2.1.1
 | 
				
			||||||
 | 
					      help-me: 5.0.0
 | 
				
			||||||
 | 
					      joycon: 3.1.1
 | 
				
			||||||
 | 
					      minimist: 1.2.8
 | 
				
			||||||
 | 
					      on-exit-leak-free: 2.1.2
 | 
				
			||||||
 | 
					      pino-abstract-transport: 2.0.0
 | 
				
			||||||
 | 
					      pump: 3.0.2
 | 
				
			||||||
 | 
					      secure-json-parse: 2.7.0
 | 
				
			||||||
 | 
					      sonic-boom: 4.2.0
 | 
				
			||||||
 | 
					      strip-json-comments: 3.1.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  pino-std-serializers@7.0.0: {}
 | 
					  pino-std-serializers@7.0.0: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  pino@9.6.0:
 | 
					  pino@9.6.0:
 | 
				
			||||||
@@ -4011,6 +4082,11 @@ snapshots:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  proxy-from-env@1.1.0: {}
 | 
					  proxy-from-env@1.1.0: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  pump@3.0.2:
 | 
				
			||||||
 | 
					    dependencies:
 | 
				
			||||||
 | 
					      end-of-stream: 1.4.4
 | 
				
			||||||
 | 
					      once: 1.4.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  queue-microtask@1.2.3: {}
 | 
					  queue-microtask@1.2.3: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  quick-format-unescaped@4.0.4: {}
 | 
					  quick-format-unescaped@4.0.4: {}
 | 
				
			||||||
@@ -4178,6 +4254,8 @@ snapshots:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  sax@1.4.1: {}
 | 
					  sax@1.4.1: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  secure-json-parse@2.7.0: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  selfsigned@2.4.1:
 | 
					  selfsigned@2.4.1:
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      '@types/node-forge': 1.3.11
 | 
					      '@types/node-forge': 1.3.11
 | 
				
			||||||
@@ -4394,6 +4472,8 @@ snapshots:
 | 
				
			|||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      ansi-regex: 6.1.0
 | 
					      ansi-regex: 6.1.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  strip-json-comments@3.1.1: {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  supports-color@7.2.0:
 | 
					  supports-color@7.2.0:
 | 
				
			||||||
    dependencies:
 | 
					    dependencies:
 | 
				
			||||||
      has-flag: 4.0.0
 | 
					      has-flag: 4.0.0
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -40,13 +40,15 @@ export class ProviderManager {
 | 
				
			|||||||
    if (!Provider) {
 | 
					    if (!Provider) {
 | 
				
			||||||
      throw new Error(`Provider ${provider} not found`);
 | 
					      throw new Error(`Provider ${provider} not found`);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    console.log('pm', 'Provider', ProviderMap[provider]);
 | 
					    const providerConfig = {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    this.provider = new Provider({
 | 
					 | 
				
			||||||
      model,
 | 
					      model,
 | 
				
			||||||
      apiKey,
 | 
					      apiKey,
 | 
				
			||||||
      baseURL,
 | 
					      baseURL,
 | 
				
			||||||
    });
 | 
					    };
 | 
				
			||||||
 | 
					    if (!providerConfig.baseURL) {
 | 
				
			||||||
 | 
					      delete providerConfig.baseURL;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    this.provider = new Provider(providerConfig);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  static async createProvider(config: ProviderManagerConfig) {
 | 
					  static async createProvider(config: ProviderManagerConfig) {
 | 
				
			||||||
    if (!config.baseURL) {
 | 
					    if (!config.baseURL) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,10 +17,10 @@ const main = async () => {
 | 
				
			|||||||
  logInfo('test', res);
 | 
					  logInfo('test', res);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// main();
 | 
					main();
 | 
				
			||||||
const mainChat = async () => {
 | 
					const mainChat = async () => {
 | 
				
			||||||
  const res = await chat.chat(chatMessage as any);
 | 
					  const res = await chat.chat(chatMessage as any);
 | 
				
			||||||
  logInfo('chat', res);
 | 
					  logInfo('chat', res);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
mainChat();
 | 
					// mainChat();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,7 @@
 | 
				
			|||||||
import { ProviderManager } from '../../provider/index.ts';
 | 
					import { ProviderManager } from '../../provider/index.ts';
 | 
				
			||||||
 | 
					import { config } from 'dotenv';
 | 
				
			||||||
const providerConfig = { provider: 'ModelScope', model: 'Qwen/Qwen2.5-Coder-32B-Instruct', apiKey: 'a4cc0e94-3633-4374-85a6-06f455e17bea' };
 | 
					config();
 | 
				
			||||||
 | 
					const providerConfig = { provider: 'ModelScope', model: 'Qwen/Qwen2.5-Coder-32B-Instruct', apiKey: process.env.MODEL_SCOPE_API_KEY };
 | 
				
			||||||
const provider = await ProviderManager.createProvider(providerConfig);
 | 
					const provider = await ProviderManager.createProvider(providerConfig);
 | 
				
			||||||
const result = await provider.chat([{ role: 'user', content: '你好' }]);
 | 
					const result = await provider.chat([{ role: 'user', content: '你好' }]);
 | 
				
			||||||
console.log(result);
 | 
					console.log(result);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,9 +7,16 @@ const siliconflow = new SiliconFlow({
 | 
				
			|||||||
  model: 'Qwen/Qwen2-7B-Instruct',
 | 
					  model: 'Qwen/Qwen2-7B-Instruct',
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const main = async () => {
 | 
					const main = async () => {
 | 
				
			||||||
  const usage = await siliconflow.getUsage();
 | 
					  const usage = await siliconflow.getUsageInfo();
 | 
				
			||||||
  console.log(usage);
 | 
					  console.log(usage);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
main();
 | 
					// main();
 | 
				
			||||||
 | 
					const mainChat = async () => {
 | 
				
			||||||
 | 
					  const res = await siliconflow.chat([{ role: 'user', content: 'Hello, world! 1 + 1 equals ?' }]);
 | 
				
			||||||
 | 
					  console.log(res);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mainChat();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user