{"version":3,"file":"LlamaCppService-lwZ2ZT0u.js","sources":["../../../.svelte-kit/adapter-node/chunks/LlamaCppService.js"],"sourcesContent":["import { existsSync, mkdirSync, writeFileSync } from \"fs\";\nimport { resolve } from \"path\";\nimport { d as private_env } from \"./shared-server.js\";\nimport dns from \"node:dns\";\ndns.setDefaultResultOrder(\"ipv4first\");\nclass LlamaCppService {\n url = \"\";\n constructor(url) {\n this.url = url;\n }\n async health() {\n try {\n const r = await fetch(`${this.url}/health`, {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\"\n }\n });\n const data = await r.json();\n if (data.status === \"ok\" || data.status === \"error\" || data.status === \"loading model\") {\n return data.status;\n }\n } catch (error) {\n console.log(JSON.parse(JSON.stringify(error)));\n }\n return \"unavailable\";\n }\n async tokenize(prompt, abortController) {\n const response = await fetch(`${this.url}/tokenize`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n \"content\": prompt\n }),\n signal: abortController.signal\n });\n if (response.ok) {\n const data = await response.json();\n if (data.tokens) {\n return data.tokens;\n }\n } else if (response.status === 404) {\n console.log(\"Tokenization endpoint not found (404).\");\n } else {\n console.log(`Failed to tokenize: ${await response.text()}`);\n }\n return null;\n }\n async detokenize(tokens, abortController) {\n const response = await fetch(`${this.url}/detokenize`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n \"tokens\": tokens\n }),\n signal: abortController.signal\n });\n if (response.ok) {\n const data = await response.json();\n if (data.content) {\n return data.content.trim();\n }\n } else if (response.status === 404) {\n console.log(\"Detokenization endpoint not found (404).\");\n } else {\n console.log(`Failed to detokenize: ${await response.text()}`);\n }\n return null;\n }\n predict(prompt, { abortController }) {\n return async ({ prompt: prompt2 }) => {\n let tokens = await this.tokenize(prompt2, abortController);\n if (tokens !== null) {\n tokens = tokens.slice(0, 30700);\n const detokenizedPrompt = await this.detokenize(tokens, abortController);\n if (detokenizedPrompt !== null) {\n prompt2 = detokenizedPrompt;\n } else {\n prompt2 = prompt2.substring(0, 32768);\n }\n } else {\n prompt2 = prompt2.substring(0, 32768);\n }\n const request = {\n \"stream\": true,\n \"stop\": [\"\", \"bot:\", \"user:\"],\n \"prompt\": `[INST] ${prompt2} [/INST]`\n };\n if (private_env.LLM_API_N_PREDICT) {\n request[\"n_predict\"] = Number(private_env.LLM_API_N_PREDICT);\n }\n if (private_env.LLM_API_TEMPERATURE) {\n request[\"temperature\"] = Number(private_env.LLM_API_TEMPERATURE);\n }\n if (private_env.LLM_API_TOP_K) {\n request[\"top_k\"] = Number(private_env.LLM_API_TOP_K);\n }\n if (private_env.LLM_API_TOP_P) {\n request[\"top_p\"] = Number(private_env.LLM_API_TOP_P);\n }\n if (private_env.LLM_API_MIN_P) {\n request[\"min_p\"] = Number(private_env.LLM_API_MIN_P);\n }\n if (private_env.LLM_API_SEED) {\n request[\"seed\"] = Number(private_env.LLM_API_SEED);\n }\n if (private_env.LLM_API_N_KEEP) {\n request[\"n_keep\"] = Number(private_env.LLM_API_N_KEEP);\n }\n if (private_env.LLM_CACHE_PROMPT) {\n request[\"cache_prompt\"] = Boolean(private_env.LLM_CACHE_PROMPT);\n }\n let r;\n while (true) {\n r = await fetch(`${this.url}/completion`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"text/event-stream\"\n },\n body: JSON.stringify(request),\n signal: abortController.signal\n });\n if (r.status === 404) {\n if (!private_env.LLM_API_404_RETRY_INTERVAL) {\n break;\n }\n console.log(`Received 404, retrying after ${private_env.LLM_API_404_RETRY_INTERVAL} seconds...`);\n await new Promise((resolve2) => setTimeout(resolve2, Number(private_env.LLM_API_404_RETRY_INTERVAL) * 1e3));\n } else {\n break;\n }\n }\n if (!r.ok) {\n throw new Error(`Failed to generate text: ${await r.text()}`);\n }\n const encoder = new TextDecoderStream();\n const reader = await r.body?.pipeThrough(encoder).getReader();\n let t = this;\n return async function* () {\n let stop = false;\n let generatedText = \"\";\n let tokenId = 0;\n while (!stop) {\n const out = await reader?.read() ?? { done: false, value: void 0 };\n if (out.done) {\n stop = true;\n reader?.cancel();\n t.createLogFile(JSON.stringify({\n \"request\": prompt2,\n \"response\": generatedText\n }), \"llm-service\");\n return;\n }\n if (!out.value) {\n stop = true;\n reader?.cancel();\n return;\n }\n let tokenValue = \"\";\n if (out.value.startsWith(\"data: \")) {\n try {\n const data = JSON.parse(out.value.slice(6));\n tokenValue = data.content;\n } catch (e) {\n }\n } else if (private_env.LLM_API_VERSION == \"v1\") {\n tokenValue = out.value;\n }\n generatedText += tokenValue.replace(\"\", \"\") ?? \"\";\n yield {\n token: {\n id: tokenId++,\n text: tokenValue.replace(\"\", \"\") ?? \"\",\n logprob: 0,\n special: false\n },\n generated_text: null,\n details: null\n };\n }\n }();\n };\n }\n conversation(history, { abortController }) {\n return async ({ history: history2 }) => {\n let prompt = this.formatPrompt(history2);\n console.log(prompt.length);\n let tokens = await this.tokenize(prompt, abortController);\n if (tokens !== null) {\n tokens = tokens.slice(-30700);\n const detokenizedPrompt = await this.detokenize(tokens, abortController);\n if (detokenizedPrompt !== null) {\n prompt = detokenizedPrompt;\n } else {\n prompt = prompt.substring(Math.max(0, prompt.length - 30700));\n }\n } else {\n prompt = prompt.substring(Math.max(0, prompt.length - 30700));\n }\n const r = await fetch(`${this.url}/completion`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"text/event-stream\"\n },\n body: JSON.stringify({\n \"stream\": true,\n \"n_predict\": 2e3,\n \"temperature\": 0.2,\n \"stop\": [\"\", \"bot:\", \"user:\"],\n \"repeat_penalty\": 1,\n \"top_k\": 40,\n \"top_p\": 0.95,\n \"min_p\": 0.05,\n \"seed\": 42,\n \"n_keep\": 0,\n \"cache_prompt\": false,\n \"prompt\": prompt\n }),\n signal: abortController.signal\n });\n if (!r.ok) {\n throw new Error(`Failed to generate text: ${await r.text()}`);\n }\n const encoder = new TextDecoderStream();\n const reader = r.body?.pipeThrough(encoder).getReader();\n return async function* () {\n let stop = false;\n let generatedText = \"\";\n let tokenId = 0;\n while (!stop) {\n const out = await reader?.read() ?? { done: false, value: void 0 };\n if (out.done) {\n reader?.cancel();\n return;\n }\n if (!out.value) {\n reader?.cancel();\n return;\n }\n let tokenValue = \"\";\n if (out.value.startsWith(\"data: \")) {\n try {\n let data2 = JSON.parse(out.value.slice(6));\n tokenValue = data2.content;\n } catch (e) {\n }\n } else if (private_env.LLM_API_VERSION == \"v1\") {\n tokenValue = out.value;\n }\n generatedText += tokenValue.replace(\"\", \"\") ?? \"\";\n yield {\n token: {\n id: tokenId++,\n text: tokenValue.replace(\"\", \"\") ?? \"\",\n logprob: 0,\n special: false\n },\n generated_text: null,\n details: null\n };\n }\n }();\n };\n }\n formatPrompt(history) {\n let prompt = \"\";\n for (const [userPrompt, botResponse] of history) {\n prompt += `[INST] ${userPrompt} [/INST]`;\n if (botResponse) {\n prompt += ` ${botResponse} `;\n }\n }\n console.log(prompt);\n return prompt;\n }\n createLogFile(text, namePrefix = \"\") {\n try {\n const logsDirectory = resolve(private_env.LOGS_ROOT_FOLDER + \"/llama\");\n if (!existsSync(logsDirectory)) {\n mkdirSync(logsDirectory, {\n recursive: true\n });\n }\n const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, \"\");\n const logFilePath = resolve(logsDirectory, `${namePrefix}${timestamp}.json`);\n writeFileSync(logFilePath, text);\n console.log(`Log file created: ${logFilePath}`);\n } catch (e) {\n console.log(`Failed to create log file in llama service`);\n console.log(e);\n }\n }\n}\nexport {\n LlamaCppService as L\n};\n"],"names":[],"mappings":";;;;;AAIA,GAAG,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;AACvC,MAAM,eAAe,CAAC;AACtB,EAAE,GAAG,GAAG,EAAE,CAAC;AACX,EAAE,WAAW,CAAC,GAAG,EAAE;AACnB,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;AACnB,GAAG;AACH,EAAE,MAAM,M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