@mkgalaxy/utilities
Advanced tools
@@ -1,5 +0,6 @@ | ||
| export declare const getDeepSeekResponse: ({ api_key, prompt, max_tokens, }: { | ||
| export declare const getDeepSeekResponse: ({ api_key, prompt, max_tokens, temperature, }: { | ||
| api_key: string; | ||
| prompt: string; | ||
| max_tokens?: number; | ||
| temperature?: number; | ||
| }) => Promise<any>; |
@@ -38,7 +38,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
| export var getDeepSeekResponse = function (_a) { | ||
| var api_key = _a.api_key, prompt = _a.prompt, _b = _a.max_tokens, max_tokens = _b === void 0 ? 900 : _b; | ||
| var api_key = _a.api_key, prompt = _a.prompt, _b = _a.max_tokens, max_tokens = _b === void 0 ? 900 : _b, _c = _a.temperature, temperature = _c === void 0 ? 0.8 : _c; | ||
| return __awaiter(void 0, void 0, void 0, function () { | ||
| var response, data; | ||
| return __generator(this, function (_c) { | ||
| switch (_c.label) { | ||
| return __generator(this, function (_d) { | ||
| switch (_d.label) { | ||
| case 0: return [4 /*yield*/, fetch("https://openrouter.ai/api/v1/chat/completions", { | ||
@@ -59,6 +59,7 @@ method: "POST", | ||
| max_tokens: max_tokens, | ||
| temperature: temperature, | ||
| }), | ||
| })]; | ||
| case 1: | ||
| response = _c.sent(); | ||
| response = _d.sent(); | ||
| if (!response.ok) { | ||
@@ -69,3 +70,3 @@ throw new Error("AI API error: ".concat(response.status, " ").concat(response.statusText)); | ||
| case 2: | ||
| data = _c.sent(); | ||
| data = _d.sent(); | ||
| return [2 /*return*/, data]; | ||
@@ -72,0 +73,0 @@ } |
+1
-1
| { | ||
| "name": "@mkgalaxy/utilities", | ||
| "version": "0.2.2", | ||
| "version": "0.2.3", | ||
| "main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
66920
0.23%962
0.21%