Spaces:
Running
Running
GitHub Actions
commited on
Commit
•
8e074b3
0
Parent(s):
Initial commit
Browse files- .gitignore +25 -0
- Dockerfile +29 -0
- README.md +10 -0
- index.js +93 -0
- indexnew.js +61 -0
- package-lock.json +1582 -0
- package.json +23 -0
- response_raw.json +53 -0
- server.js +132 -0
- server4bje.js +104 -0
- serverG1.js +125 -0
- serverG1Next.js +119 -0
- serverGiSuper.js +125 -0
- server_final1.js +106 -0
.gitignore
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Logs
|
2 |
+
logs
|
3 |
+
*.log
|
4 |
+
npm-debug.log*
|
5 |
+
yarn-debug.log*
|
6 |
+
yarn-error.log*
|
7 |
+
pnpm-debug.log*
|
8 |
+
lerna-debug.log*
|
9 |
+
|
10 |
+
node_modules
|
11 |
+
dist
|
12 |
+
dist-ssr
|
13 |
+
*.local
|
14 |
+
|
15 |
+
# Editor directories and files
|
16 |
+
.vscode/*
|
17 |
+
!.vscode/extensions.json
|
18 |
+
.idea
|
19 |
+
.DS_Store
|
20 |
+
*.suo
|
21 |
+
*.ntvs*
|
22 |
+
*.njsproj
|
23 |
+
*.sln
|
24 |
+
*.sw?
|
25 |
+
.env
|
Dockerfile
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM node:18-slim
|
2 |
+
|
3 |
+
# Switch to the node user
|
4 |
+
USER node
|
5 |
+
|
6 |
+
# Set environment variables for the user
|
7 |
+
ENV HOME=/home/node \
|
8 |
+
PATH=/home/node/.local/bin:$PATH
|
9 |
+
|
10 |
+
# Set the working directory
|
11 |
+
WORKDIR $HOME/app
|
12 |
+
|
13 |
+
# Copy the package.json and package-lock.json files to the working directory
|
14 |
+
COPY --chown=node:node package*.json ./
|
15 |
+
|
16 |
+
# Install Node.js dependencies
|
17 |
+
RUN npm install
|
18 |
+
|
19 |
+
# Copy the application code to the working directory
|
20 |
+
COPY --chown=node:node . .
|
21 |
+
|
22 |
+
# Ensure the ownership of the directory to the node user
|
23 |
+
RUN chown -R node:node .
|
24 |
+
|
25 |
+
# Expose the port the app runs on
|
26 |
+
EXPOSE 7860
|
27 |
+
|
28 |
+
# Command to run the Node.js server
|
29 |
+
CMD ["node", "server.js"]
|
README.md
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: G1
|
3 |
+
emoji: 🐨
|
4 |
+
colorFrom: yellow
|
5 |
+
colorTo: green
|
6 |
+
sdk: docker
|
7 |
+
pinned: false
|
8 |
+
---
|
9 |
+
|
10 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.js
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { default: Groq } = require("groq-sdk");
|
2 |
+
const { Ollama } = require("ollama");
|
3 |
+
|
4 |
+
|
5 |
+
const groq = new Groq({ apiKey: "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" });
|
6 |
+
|
7 |
+
async function getGroqChatCompletion(q) {
|
8 |
+
data = await groq.chat.completions.create({
|
9 |
+
messages: [
|
10 |
+
{
|
11 |
+
role: "user",
|
12 |
+
content: q,
|
13 |
+
},
|
14 |
+
|
15 |
+
],
|
16 |
+
|
17 |
+
model: "llama-3.1-70b-versatile",
|
18 |
+
});
|
19 |
+
|
20 |
+
return data.choices[0]?.message?.content || "";
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
const ollama = new Ollama({ host: "http://localhost:11434" });
|
25 |
+
|
26 |
+
// Function to call the Ollama model through the library
|
27 |
+
async function callLLM(query) {
|
28 |
+
try {
|
29 |
+
return getGroqChatCompletion(query);
|
30 |
+
console.log(`Prompt: ${query}`); // Log the prompt being sent
|
31 |
+
const response = await ollama.generate({
|
32 |
+
model: "qwen2.5-coder",
|
33 |
+
prompt: query,
|
34 |
+
});
|
35 |
+
|
36 |
+
// console.log(response);
|
37 |
+
|
38 |
+
const output = response.response.trim();
|
39 |
+
console.log(`Response: ${output}`); // Log the response received
|
40 |
+
return output;
|
41 |
+
} catch (error) {
|
42 |
+
console.error("Error:", error);
|
43 |
+
throw error;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
// Function to create a chain of thought for the input question
|
48 |
+
async function chainOfThought(inputQuery) {
|
49 |
+
let thoughtChain = [];
|
50 |
+
|
51 |
+
console.log(`\nInput Question: ${inputQuery}\n`);
|
52 |
+
|
53 |
+
const step1 = `Break down the following question into key points: "${inputQuery}"`;
|
54 |
+
const understanding = await callLLM(step1);
|
55 |
+
thoughtChain.push(understanding);
|
56 |
+
|
57 |
+
const step2 = `Given the key points: "${understanding}", provide any relevant background information.`;
|
58 |
+
const context = await callLLM(step2);
|
59 |
+
thoughtChain.push(context);
|
60 |
+
|
61 |
+
const step3 = `Analyze the following question based on its background information: "${inputQuery}". What are the different aspects to consider?`;
|
62 |
+
const analysis = await callLLM(step3);
|
63 |
+
thoughtChain.push(analysis);
|
64 |
+
|
65 |
+
const step4 = `Based on the analysis: "${analysis}", generate possible solutions or insights.`;
|
66 |
+
const solutions = await callLLM(step4);
|
67 |
+
thoughtChain.push(solutions);
|
68 |
+
|
69 |
+
const step5 = `Given the possible solutions: "${solutions}", evaluate the pros and cons, or refine the best approach.`;
|
70 |
+
const evaluation = await callLLM(step5);
|
71 |
+
thoughtChain.push(evaluation);
|
72 |
+
|
73 |
+
const step6 = `Based on the evaluation: "${evaluation}", provide a concise and well-reasoned answer to the original question.`;
|
74 |
+
const conclusion = await callLLM(step6);
|
75 |
+
thoughtChain.push(conclusion);
|
76 |
+
|
77 |
+
return {
|
78 |
+
thoughtProcess: thoughtChain,
|
79 |
+
finalAnswer: conclusion,
|
80 |
+
};
|
81 |
+
}
|
82 |
+
|
83 |
+
// Test the function with an example question
|
84 |
+
const inputQuestion =
|
85 |
+
"How can we improve network security in a large organization?";
|
86 |
+
chainOfThought(inputQuestion)
|
87 |
+
.then((response) => {
|
88 |
+
console.log("\nFinal Thought Process:", response.thoughtProcess);
|
89 |
+
console.log("Final Answer:", response.finalAnswer);
|
90 |
+
})
|
91 |
+
.catch((error) => {
|
92 |
+
console.error("Error:", error);
|
93 |
+
});
|
indexnew.js
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import ollama from "ollama";
|
2 |
+
|
3 |
+
// Function to call the Ollama model through the library
|
4 |
+
async function callLLM(query) {
|
5 |
+
try {
|
6 |
+
const response = await ollama.chat({
|
7 |
+
model: "qwen-2.5-coder", // Replace with the specific model you want
|
8 |
+
messages: [{ role: "user", content: query }],
|
9 |
+
});
|
10 |
+
return response.response.trim();
|
11 |
+
} catch (error) {
|
12 |
+
console.error("Error:", error);
|
13 |
+
throw error;
|
14 |
+
}
|
15 |
+
}
|
16 |
+
|
17 |
+
// Function to create a chain of thought for the input question
|
18 |
+
async function chainOfThought(inputQuery) {
|
19 |
+
let thoughtChain = [];
|
20 |
+
|
21 |
+
const step1 = `Break down the following question into key points: "${inputQuery}"`;
|
22 |
+
const understanding = await callLLM(step1);
|
23 |
+
thoughtChain.push(understanding);
|
24 |
+
|
25 |
+
const step2 = `Given the key points: "${understanding}", provide any relevant background information.`;
|
26 |
+
const context = await callLLM(step2);
|
27 |
+
thoughtChain.push(context);
|
28 |
+
|
29 |
+
const step3 = `Analyze the following question based on its background information: "${inputQuery}". What are the different aspects to consider?`;
|
30 |
+
const analysis = await callLLM(step3);
|
31 |
+
thoughtChain.push(analysis);
|
32 |
+
|
33 |
+
const step4 = `Based on the analysis: "${analysis}", generate possible solutions or insights.`;
|
34 |
+
const solutions = await callLLM(step4);
|
35 |
+
thoughtChain.push(solutions);
|
36 |
+
|
37 |
+
const step5 = `Given the possible solutions: "${solutions}", evaluate the pros and cons, or refine the best approach.`;
|
38 |
+
const evaluation = await callLLM(step5);
|
39 |
+
thoughtChain.push(evaluation);
|
40 |
+
|
41 |
+
const step6 = `Based on the evaluation: "${evaluation}", provide a concise and well-reasoned answer to the original question.`;
|
42 |
+
const conclusion = await callLLM(step6);
|
43 |
+
thoughtChain.push(conclusion);
|
44 |
+
|
45 |
+
return {
|
46 |
+
thoughtProcess: thoughtChain,
|
47 |
+
finalAnswer: conclusion,
|
48 |
+
};
|
49 |
+
}
|
50 |
+
|
51 |
+
// Test the function with an example question
|
52 |
+
const inputQuestion =
|
53 |
+
"How can we improve network security in a large organization?";
|
54 |
+
chainOfThought(inputQuestion)
|
55 |
+
.then((response) => {
|
56 |
+
console.log("Thought Process:", response.thoughtProcess);
|
57 |
+
console.log("Final Answer:", response.finalAnswer);
|
58 |
+
})
|
59 |
+
.catch((error) => {
|
60 |
+
console.error("Error:", error);
|
61 |
+
});
|
package-lock.json
ADDED
@@ -0,0 +1,1582 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "llmchain",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"lockfileVersion": 3,
|
5 |
+
"requires": true,
|
6 |
+
"packages": {
|
7 |
+
"": {
|
8 |
+
"name": "llmchain",
|
9 |
+
"version": "1.0.0",
|
10 |
+
"license": "ISC",
|
11 |
+
"dependencies": {
|
12 |
+
"dotenv": "^16.4.5",
|
13 |
+
"express": "^4.21.1",
|
14 |
+
"groq-sdk": "^0.7.0",
|
15 |
+
"ollama": "^0.5.9",
|
16 |
+
"socket.io": "^4.8.0"
|
17 |
+
},
|
18 |
+
"devDependencies": {
|
19 |
+
"nodemon": "^3.1.7"
|
20 |
+
}
|
21 |
+
},
|
22 |
+
"node_modules/@socket.io/component-emitter": {
|
23 |
+
"version": "3.1.2",
|
24 |
+
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
|
25 |
+
"integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==",
|
26 |
+
"license": "MIT"
|
27 |
+
},
|
28 |
+
"node_modules/@types/cookie": {
|
29 |
+
"version": "0.4.1",
|
30 |
+
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz",
|
31 |
+
"integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==",
|
32 |
+
"license": "MIT"
|
33 |
+
},
|
34 |
+
"node_modules/@types/cors": {
|
35 |
+
"version": "2.8.17",
|
36 |
+
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz",
|
37 |
+
"integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==",
|
38 |
+
"license": "MIT",
|
39 |
+
"dependencies": {
|
40 |
+
"@types/node": "*"
|
41 |
+
}
|
42 |
+
},
|
43 |
+
"node_modules/@types/node": {
|
44 |
+
"version": "18.19.57",
|
45 |
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.57.tgz",
|
46 |
+
"integrity": "sha512-I2ioBd/IPrYDMv9UNR5NlPElOZ68QB7yY5V2EsLtSrTO0LM0PnCEFF9biLWHf5k+sIy4ohueCV9t4gk1AEdlVA==",
|
47 |
+
"license": "MIT",
|
48 |
+
"dependencies": {
|
49 |
+
"undici-types": "~5.26.4"
|
50 |
+
}
|
51 |
+
},
|
52 |
+
"node_modules/@types/node-fetch": {
|
53 |
+
"version": "2.6.11",
|
54 |
+
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz",
|
55 |
+
"integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==",
|
56 |
+
"license": "MIT",
|
57 |
+
"dependencies": {
|
58 |
+
"@types/node": "*",
|
59 |
+
"form-data": "^4.0.0"
|
60 |
+
}
|
61 |
+
},
|
62 |
+
"node_modules/abort-controller": {
|
63 |
+
"version": "3.0.0",
|
64 |
+
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
65 |
+
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
66 |
+
"license": "MIT",
|
67 |
+
"dependencies": {
|
68 |
+
"event-target-shim": "^5.0.0"
|
69 |
+
},
|
70 |
+
"engines": {
|
71 |
+
"node": ">=6.5"
|
72 |
+
}
|
73 |
+
},
|
74 |
+
"node_modules/accepts": {
|
75 |
+
"version": "1.3.8",
|
76 |
+
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
77 |
+
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
|
78 |
+
"license": "MIT",
|
79 |
+
"dependencies": {
|
80 |
+
"mime-types": "~2.1.34",
|
81 |
+
"negotiator": "0.6.3"
|
82 |
+
},
|
83 |
+
"engines": {
|
84 |
+
"node": ">= 0.6"
|
85 |
+
}
|
86 |
+
},
|
87 |
+
"node_modules/agentkeepalive": {
|
88 |
+
"version": "4.5.0",
|
89 |
+
"resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz",
|
90 |
+
"integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==",
|
91 |
+
"license": "MIT",
|
92 |
+
"dependencies": {
|
93 |
+
"humanize-ms": "^1.2.1"
|
94 |
+
},
|
95 |
+
"engines": {
|
96 |
+
"node": ">= 8.0.0"
|
97 |
+
}
|
98 |
+
},
|
99 |
+
"node_modules/anymatch": {
|
100 |
+
"version": "3.1.3",
|
101 |
+
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
102 |
+
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
|
103 |
+
"dev": true,
|
104 |
+
"license": "ISC",
|
105 |
+
"dependencies": {
|
106 |
+
"normalize-path": "^3.0.0",
|
107 |
+
"picomatch": "^2.0.4"
|
108 |
+
},
|
109 |
+
"engines": {
|
110 |
+
"node": ">= 8"
|
111 |
+
}
|
112 |
+
},
|
113 |
+
"node_modules/array-flatten": {
|
114 |
+
"version": "1.1.1",
|
115 |
+
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
116 |
+
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
|
117 |
+
"license": "MIT"
|
118 |
+
},
|
119 |
+
"node_modules/asynckit": {
|
120 |
+
"version": "0.4.0",
|
121 |
+
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
122 |
+
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
123 |
+
"license": "MIT"
|
124 |
+
},
|
125 |
+
"node_modules/balanced-match": {
|
126 |
+
"version": "1.0.2",
|
127 |
+
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
128 |
+
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
129 |
+
"dev": true,
|
130 |
+
"license": "MIT"
|
131 |
+
},
|
132 |
+
"node_modules/base64id": {
|
133 |
+
"version": "2.0.0",
|
134 |
+
"resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
|
135 |
+
"integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==",
|
136 |
+
"license": "MIT",
|
137 |
+
"engines": {
|
138 |
+
"node": "^4.5.0 || >= 5.9"
|
139 |
+
}
|
140 |
+
},
|
141 |
+
"node_modules/binary-extensions": {
|
142 |
+
"version": "2.3.0",
|
143 |
+
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
|
144 |
+
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
|
145 |
+
"dev": true,
|
146 |
+
"license": "MIT",
|
147 |
+
"engines": {
|
148 |
+
"node": ">=8"
|
149 |
+
},
|
150 |
+
"funding": {
|
151 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
152 |
+
}
|
153 |
+
},
|
154 |
+
"node_modules/body-parser": {
|
155 |
+
"version": "1.20.3",
|
156 |
+
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
|
157 |
+
"integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
|
158 |
+
"license": "MIT",
|
159 |
+
"dependencies": {
|
160 |
+
"bytes": "3.1.2",
|
161 |
+
"content-type": "~1.0.5",
|
162 |
+
"debug": "2.6.9",
|
163 |
+
"depd": "2.0.0",
|
164 |
+
"destroy": "1.2.0",
|
165 |
+
"http-errors": "2.0.0",
|
166 |
+
"iconv-lite": "0.4.24",
|
167 |
+
"on-finished": "2.4.1",
|
168 |
+
"qs": "6.13.0",
|
169 |
+
"raw-body": "2.5.2",
|
170 |
+
"type-is": "~1.6.18",
|
171 |
+
"unpipe": "1.0.0"
|
172 |
+
},
|
173 |
+
"engines": {
|
174 |
+
"node": ">= 0.8",
|
175 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
176 |
+
}
|
177 |
+
},
|
178 |
+
"node_modules/body-parser/node_modules/debug": {
|
179 |
+
"version": "2.6.9",
|
180 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
181 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
182 |
+
"license": "MIT",
|
183 |
+
"dependencies": {
|
184 |
+
"ms": "2.0.0"
|
185 |
+
}
|
186 |
+
},
|
187 |
+
"node_modules/body-parser/node_modules/ms": {
|
188 |
+
"version": "2.0.0",
|
189 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
190 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
191 |
+
"license": "MIT"
|
192 |
+
},
|
193 |
+
"node_modules/brace-expansion": {
|
194 |
+
"version": "1.1.11",
|
195 |
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
196 |
+
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
197 |
+
"dev": true,
|
198 |
+
"license": "MIT",
|
199 |
+
"dependencies": {
|
200 |
+
"balanced-match": "^1.0.0",
|
201 |
+
"concat-map": "0.0.1"
|
202 |
+
}
|
203 |
+
},
|
204 |
+
"node_modules/braces": {
|
205 |
+
"version": "3.0.3",
|
206 |
+
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
207 |
+
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
208 |
+
"dev": true,
|
209 |
+
"license": "MIT",
|
210 |
+
"dependencies": {
|
211 |
+
"fill-range": "^7.1.1"
|
212 |
+
},
|
213 |
+
"engines": {
|
214 |
+
"node": ">=8"
|
215 |
+
}
|
216 |
+
},
|
217 |
+
"node_modules/bytes": {
|
218 |
+
"version": "3.1.2",
|
219 |
+
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
220 |
+
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
221 |
+
"license": "MIT",
|
222 |
+
"engines": {
|
223 |
+
"node": ">= 0.8"
|
224 |
+
}
|
225 |
+
},
|
226 |
+
"node_modules/call-bind": {
|
227 |
+
"version": "1.0.7",
|
228 |
+
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
|
229 |
+
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
|
230 |
+
"license": "MIT",
|
231 |
+
"dependencies": {
|
232 |
+
"es-define-property": "^1.0.0",
|
233 |
+
"es-errors": "^1.3.0",
|
234 |
+
"function-bind": "^1.1.2",
|
235 |
+
"get-intrinsic": "^1.2.4",
|
236 |
+
"set-function-length": "^1.2.1"
|
237 |
+
},
|
238 |
+
"engines": {
|
239 |
+
"node": ">= 0.4"
|
240 |
+
},
|
241 |
+
"funding": {
|
242 |
+
"url": "https://github.com/sponsors/ljharb"
|
243 |
+
}
|
244 |
+
},
|
245 |
+
"node_modules/chokidar": {
|
246 |
+
"version": "3.6.0",
|
247 |
+
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
|
248 |
+
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
|
249 |
+
"dev": true,
|
250 |
+
"license": "MIT",
|
251 |
+
"dependencies": {
|
252 |
+
"anymatch": "~3.1.2",
|
253 |
+
"braces": "~3.0.2",
|
254 |
+
"glob-parent": "~5.1.2",
|
255 |
+
"is-binary-path": "~2.1.0",
|
256 |
+
"is-glob": "~4.0.1",
|
257 |
+
"normalize-path": "~3.0.0",
|
258 |
+
"readdirp": "~3.6.0"
|
259 |
+
},
|
260 |
+
"engines": {
|
261 |
+
"node": ">= 8.10.0"
|
262 |
+
},
|
263 |
+
"funding": {
|
264 |
+
"url": "https://paulmillr.com/funding/"
|
265 |
+
},
|
266 |
+
"optionalDependencies": {
|
267 |
+
"fsevents": "~2.3.2"
|
268 |
+
}
|
269 |
+
},
|
270 |
+
"node_modules/combined-stream": {
|
271 |
+
"version": "1.0.8",
|
272 |
+
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
273 |
+
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
274 |
+
"license": "MIT",
|
275 |
+
"dependencies": {
|
276 |
+
"delayed-stream": "~1.0.0"
|
277 |
+
},
|
278 |
+
"engines": {
|
279 |
+
"node": ">= 0.8"
|
280 |
+
}
|
281 |
+
},
|
282 |
+
"node_modules/concat-map": {
|
283 |
+
"version": "0.0.1",
|
284 |
+
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
285 |
+
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
286 |
+
"dev": true,
|
287 |
+
"license": "MIT"
|
288 |
+
},
|
289 |
+
"node_modules/content-disposition": {
|
290 |
+
"version": "0.5.4",
|
291 |
+
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
292 |
+
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
|
293 |
+
"license": "MIT",
|
294 |
+
"dependencies": {
|
295 |
+
"safe-buffer": "5.2.1"
|
296 |
+
},
|
297 |
+
"engines": {
|
298 |
+
"node": ">= 0.6"
|
299 |
+
}
|
300 |
+
},
|
301 |
+
"node_modules/content-type": {
|
302 |
+
"version": "1.0.5",
|
303 |
+
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
|
304 |
+
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
305 |
+
"license": "MIT",
|
306 |
+
"engines": {
|
307 |
+
"node": ">= 0.6"
|
308 |
+
}
|
309 |
+
},
|
310 |
+
"node_modules/cookie": {
|
311 |
+
"version": "0.7.1",
|
312 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",
|
313 |
+
"integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
|
314 |
+
"license": "MIT",
|
315 |
+
"engines": {
|
316 |
+
"node": ">= 0.6"
|
317 |
+
}
|
318 |
+
},
|
319 |
+
"node_modules/cookie-signature": {
|
320 |
+
"version": "1.0.6",
|
321 |
+
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
322 |
+
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
|
323 |
+
"license": "MIT"
|
324 |
+
},
|
325 |
+
"node_modules/cors": {
|
326 |
+
"version": "2.8.5",
|
327 |
+
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
|
328 |
+
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
|
329 |
+
"license": "MIT",
|
330 |
+
"dependencies": {
|
331 |
+
"object-assign": "^4",
|
332 |
+
"vary": "^1"
|
333 |
+
},
|
334 |
+
"engines": {
|
335 |
+
"node": ">= 0.10"
|
336 |
+
}
|
337 |
+
},
|
338 |
+
"node_modules/debug": {
|
339 |
+
"version": "4.3.7",
|
340 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
341 |
+
"integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
|
342 |
+
"license": "MIT",
|
343 |
+
"dependencies": {
|
344 |
+
"ms": "^2.1.3"
|
345 |
+
},
|
346 |
+
"engines": {
|
347 |
+
"node": ">=6.0"
|
348 |
+
},
|
349 |
+
"peerDependenciesMeta": {
|
350 |
+
"supports-color": {
|
351 |
+
"optional": true
|
352 |
+
}
|
353 |
+
}
|
354 |
+
},
|
355 |
+
"node_modules/define-data-property": {
|
356 |
+
"version": "1.1.4",
|
357 |
+
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
|
358 |
+
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
359 |
+
"license": "MIT",
|
360 |
+
"dependencies": {
|
361 |
+
"es-define-property": "^1.0.0",
|
362 |
+
"es-errors": "^1.3.0",
|
363 |
+
"gopd": "^1.0.1"
|
364 |
+
},
|
365 |
+
"engines": {
|
366 |
+
"node": ">= 0.4"
|
367 |
+
},
|
368 |
+
"funding": {
|
369 |
+
"url": "https://github.com/sponsors/ljharb"
|
370 |
+
}
|
371 |
+
},
|
372 |
+
"node_modules/delayed-stream": {
|
373 |
+
"version": "1.0.0",
|
374 |
+
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
375 |
+
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
376 |
+
"license": "MIT",
|
377 |
+
"engines": {
|
378 |
+
"node": ">=0.4.0"
|
379 |
+
}
|
380 |
+
},
|
381 |
+
"node_modules/depd": {
|
382 |
+
"version": "2.0.0",
|
383 |
+
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
384 |
+
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
385 |
+
"license": "MIT",
|
386 |
+
"engines": {
|
387 |
+
"node": ">= 0.8"
|
388 |
+
}
|
389 |
+
},
|
390 |
+
"node_modules/destroy": {
|
391 |
+
"version": "1.2.0",
|
392 |
+
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
|
393 |
+
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
|
394 |
+
"license": "MIT",
|
395 |
+
"engines": {
|
396 |
+
"node": ">= 0.8",
|
397 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
398 |
+
}
|
399 |
+
},
|
400 |
+
"node_modules/dotenv": {
|
401 |
+
"version": "16.4.5",
|
402 |
+
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz",
|
403 |
+
"integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
|
404 |
+
"license": "BSD-2-Clause",
|
405 |
+
"engines": {
|
406 |
+
"node": ">=12"
|
407 |
+
},
|
408 |
+
"funding": {
|
409 |
+
"url": "https://dotenvx.com"
|
410 |
+
}
|
411 |
+
},
|
412 |
+
"node_modules/ee-first": {
|
413 |
+
"version": "1.1.1",
|
414 |
+
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
415 |
+
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
|
416 |
+
"license": "MIT"
|
417 |
+
},
|
418 |
+
"node_modules/encodeurl": {
|
419 |
+
"version": "2.0.0",
|
420 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
421 |
+
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
422 |
+
"license": "MIT",
|
423 |
+
"engines": {
|
424 |
+
"node": ">= 0.8"
|
425 |
+
}
|
426 |
+
},
|
427 |
+
"node_modules/engine.io": {
|
428 |
+
"version": "6.6.2",
|
429 |
+
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.2.tgz",
|
430 |
+
"integrity": "sha512-gmNvsYi9C8iErnZdVcJnvCpSKbWTt1E8+JZo8b+daLninywUWi5NQ5STSHZ9rFjFO7imNcvb8Pc5pe/wMR5xEw==",
|
431 |
+
"license": "MIT",
|
432 |
+
"dependencies": {
|
433 |
+
"@types/cookie": "^0.4.1",
|
434 |
+
"@types/cors": "^2.8.12",
|
435 |
+
"@types/node": ">=10.0.0",
|
436 |
+
"accepts": "~1.3.4",
|
437 |
+
"base64id": "2.0.0",
|
438 |
+
"cookie": "~0.7.2",
|
439 |
+
"cors": "~2.8.5",
|
440 |
+
"debug": "~4.3.1",
|
441 |
+
"engine.io-parser": "~5.2.1",
|
442 |
+
"ws": "~8.17.1"
|
443 |
+
},
|
444 |
+
"engines": {
|
445 |
+
"node": ">=10.2.0"
|
446 |
+
}
|
447 |
+
},
|
448 |
+
"node_modules/engine.io-parser": {
|
449 |
+
"version": "5.2.3",
|
450 |
+
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz",
|
451 |
+
"integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==",
|
452 |
+
"license": "MIT",
|
453 |
+
"engines": {
|
454 |
+
"node": ">=10.0.0"
|
455 |
+
}
|
456 |
+
},
|
457 |
+
"node_modules/engine.io/node_modules/cookie": {
|
458 |
+
"version": "0.7.2",
|
459 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
|
460 |
+
"integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
|
461 |
+
"license": "MIT",
|
462 |
+
"engines": {
|
463 |
+
"node": ">= 0.6"
|
464 |
+
}
|
465 |
+
},
|
466 |
+
"node_modules/es-define-property": {
|
467 |
+
"version": "1.0.0",
|
468 |
+
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
|
469 |
+
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
|
470 |
+
"license": "MIT",
|
471 |
+
"dependencies": {
|
472 |
+
"get-intrinsic": "^1.2.4"
|
473 |
+
},
|
474 |
+
"engines": {
|
475 |
+
"node": ">= 0.4"
|
476 |
+
}
|
477 |
+
},
|
478 |
+
"node_modules/es-errors": {
|
479 |
+
"version": "1.3.0",
|
480 |
+
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
481 |
+
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
482 |
+
"license": "MIT",
|
483 |
+
"engines": {
|
484 |
+
"node": ">= 0.4"
|
485 |
+
}
|
486 |
+
},
|
487 |
+
"node_modules/escape-html": {
|
488 |
+
"version": "1.0.3",
|
489 |
+
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
490 |
+
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
|
491 |
+
"license": "MIT"
|
492 |
+
},
|
493 |
+
"node_modules/etag": {
|
494 |
+
"version": "1.8.1",
|
495 |
+
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
496 |
+
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
497 |
+
"license": "MIT",
|
498 |
+
"engines": {
|
499 |
+
"node": ">= 0.6"
|
500 |
+
}
|
501 |
+
},
|
502 |
+
"node_modules/event-target-shim": {
|
503 |
+
"version": "5.0.1",
|
504 |
+
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
505 |
+
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
|
506 |
+
"license": "MIT",
|
507 |
+
"engines": {
|
508 |
+
"node": ">=6"
|
509 |
+
}
|
510 |
+
},
|
511 |
+
"node_modules/express": {
|
512 |
+
"version": "4.21.1",
|
513 |
+
"resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz",
|
514 |
+
"integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==",
|
515 |
+
"license": "MIT",
|
516 |
+
"dependencies": {
|
517 |
+
"accepts": "~1.3.8",
|
518 |
+
"array-flatten": "1.1.1",
|
519 |
+
"body-parser": "1.20.3",
|
520 |
+
"content-disposition": "0.5.4",
|
521 |
+
"content-type": "~1.0.4",
|
522 |
+
"cookie": "0.7.1",
|
523 |
+
"cookie-signature": "1.0.6",
|
524 |
+
"debug": "2.6.9",
|
525 |
+
"depd": "2.0.0",
|
526 |
+
"encodeurl": "~2.0.0",
|
527 |
+
"escape-html": "~1.0.3",
|
528 |
+
"etag": "~1.8.1",
|
529 |
+
"finalhandler": "1.3.1",
|
530 |
+
"fresh": "0.5.2",
|
531 |
+
"http-errors": "2.0.0",
|
532 |
+
"merge-descriptors": "1.0.3",
|
533 |
+
"methods": "~1.1.2",
|
534 |
+
"on-finished": "2.4.1",
|
535 |
+
"parseurl": "~1.3.3",
|
536 |
+
"path-to-regexp": "0.1.10",
|
537 |
+
"proxy-addr": "~2.0.7",
|
538 |
+
"qs": "6.13.0",
|
539 |
+
"range-parser": "~1.2.1",
|
540 |
+
"safe-buffer": "5.2.1",
|
541 |
+
"send": "0.19.0",
|
542 |
+
"serve-static": "1.16.2",
|
543 |
+
"setprototypeof": "1.2.0",
|
544 |
+
"statuses": "2.0.1",
|
545 |
+
"type-is": "~1.6.18",
|
546 |
+
"utils-merge": "1.0.1",
|
547 |
+
"vary": "~1.1.2"
|
548 |
+
},
|
549 |
+
"engines": {
|
550 |
+
"node": ">= 0.10.0"
|
551 |
+
}
|
552 |
+
},
|
553 |
+
"node_modules/express/node_modules/debug": {
|
554 |
+
"version": "2.6.9",
|
555 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
556 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
557 |
+
"license": "MIT",
|
558 |
+
"dependencies": {
|
559 |
+
"ms": "2.0.0"
|
560 |
+
}
|
561 |
+
},
|
562 |
+
"node_modules/express/node_modules/ms": {
|
563 |
+
"version": "2.0.0",
|
564 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
565 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
566 |
+
"license": "MIT"
|
567 |
+
},
|
568 |
+
"node_modules/fill-range": {
|
569 |
+
"version": "7.1.1",
|
570 |
+
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
571 |
+
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
572 |
+
"dev": true,
|
573 |
+
"license": "MIT",
|
574 |
+
"dependencies": {
|
575 |
+
"to-regex-range": "^5.0.1"
|
576 |
+
},
|
577 |
+
"engines": {
|
578 |
+
"node": ">=8"
|
579 |
+
}
|
580 |
+
},
|
581 |
+
"node_modules/finalhandler": {
|
582 |
+
"version": "1.3.1",
|
583 |
+
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
|
584 |
+
"integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
|
585 |
+
"license": "MIT",
|
586 |
+
"dependencies": {
|
587 |
+
"debug": "2.6.9",
|
588 |
+
"encodeurl": "~2.0.0",
|
589 |
+
"escape-html": "~1.0.3",
|
590 |
+
"on-finished": "2.4.1",
|
591 |
+
"parseurl": "~1.3.3",
|
592 |
+
"statuses": "2.0.1",
|
593 |
+
"unpipe": "~1.0.0"
|
594 |
+
},
|
595 |
+
"engines": {
|
596 |
+
"node": ">= 0.8"
|
597 |
+
}
|
598 |
+
},
|
599 |
+
"node_modules/finalhandler/node_modules/debug": {
|
600 |
+
"version": "2.6.9",
|
601 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
602 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
603 |
+
"license": "MIT",
|
604 |
+
"dependencies": {
|
605 |
+
"ms": "2.0.0"
|
606 |
+
}
|
607 |
+
},
|
608 |
+
"node_modules/finalhandler/node_modules/ms": {
|
609 |
+
"version": "2.0.0",
|
610 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
611 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
612 |
+
"license": "MIT"
|
613 |
+
},
|
614 |
+
"node_modules/form-data": {
|
615 |
+
"version": "4.0.1",
|
616 |
+
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz",
|
617 |
+
"integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==",
|
618 |
+
"license": "MIT",
|
619 |
+
"dependencies": {
|
620 |
+
"asynckit": "^0.4.0",
|
621 |
+
"combined-stream": "^1.0.8",
|
622 |
+
"mime-types": "^2.1.12"
|
623 |
+
},
|
624 |
+
"engines": {
|
625 |
+
"node": ">= 6"
|
626 |
+
}
|
627 |
+
},
|
628 |
+
"node_modules/form-data-encoder": {
|
629 |
+
"version": "1.7.2",
|
630 |
+
"resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz",
|
631 |
+
"integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==",
|
632 |
+
"license": "MIT"
|
633 |
+
},
|
634 |
+
"node_modules/formdata-node": {
|
635 |
+
"version": "4.4.1",
|
636 |
+
"resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz",
|
637 |
+
"integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==",
|
638 |
+
"license": "MIT",
|
639 |
+
"dependencies": {
|
640 |
+
"node-domexception": "1.0.0",
|
641 |
+
"web-streams-polyfill": "4.0.0-beta.3"
|
642 |
+
},
|
643 |
+
"engines": {
|
644 |
+
"node": ">= 12.20"
|
645 |
+
}
|
646 |
+
},
|
647 |
+
"node_modules/forwarded": {
|
648 |
+
"version": "0.2.0",
|
649 |
+
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
650 |
+
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
651 |
+
"license": "MIT",
|
652 |
+
"engines": {
|
653 |
+
"node": ">= 0.6"
|
654 |
+
}
|
655 |
+
},
|
656 |
+
"node_modules/fresh": {
|
657 |
+
"version": "0.5.2",
|
658 |
+
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
659 |
+
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
|
660 |
+
"license": "MIT",
|
661 |
+
"engines": {
|
662 |
+
"node": ">= 0.6"
|
663 |
+
}
|
664 |
+
},
|
665 |
+
"node_modules/fsevents": {
|
666 |
+
"version": "2.3.3",
|
667 |
+
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
668 |
+
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
669 |
+
"dev": true,
|
670 |
+
"hasInstallScript": true,
|
671 |
+
"license": "MIT",
|
672 |
+
"optional": true,
|
673 |
+
"os": [
|
674 |
+
"darwin"
|
675 |
+
],
|
676 |
+
"engines": {
|
677 |
+
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
678 |
+
}
|
679 |
+
},
|
680 |
+
"node_modules/function-bind": {
|
681 |
+
"version": "1.1.2",
|
682 |
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
683 |
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
684 |
+
"license": "MIT",
|
685 |
+
"funding": {
|
686 |
+
"url": "https://github.com/sponsors/ljharb"
|
687 |
+
}
|
688 |
+
},
|
689 |
+
"node_modules/get-intrinsic": {
|
690 |
+
"version": "1.2.4",
|
691 |
+
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
|
692 |
+
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
|
693 |
+
"license": "MIT",
|
694 |
+
"dependencies": {
|
695 |
+
"es-errors": "^1.3.0",
|
696 |
+
"function-bind": "^1.1.2",
|
697 |
+
"has-proto": "^1.0.1",
|
698 |
+
"has-symbols": "^1.0.3",
|
699 |
+
"hasown": "^2.0.0"
|
700 |
+
},
|
701 |
+
"engines": {
|
702 |
+
"node": ">= 0.4"
|
703 |
+
},
|
704 |
+
"funding": {
|
705 |
+
"url": "https://github.com/sponsors/ljharb"
|
706 |
+
}
|
707 |
+
},
|
708 |
+
"node_modules/glob-parent": {
|
709 |
+
"version": "5.1.2",
|
710 |
+
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
711 |
+
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
712 |
+
"dev": true,
|
713 |
+
"license": "ISC",
|
714 |
+
"dependencies": {
|
715 |
+
"is-glob": "^4.0.1"
|
716 |
+
},
|
717 |
+
"engines": {
|
718 |
+
"node": ">= 6"
|
719 |
+
}
|
720 |
+
},
|
721 |
+
"node_modules/gopd": {
|
722 |
+
"version": "1.0.1",
|
723 |
+
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
|
724 |
+
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
|
725 |
+
"license": "MIT",
|
726 |
+
"dependencies": {
|
727 |
+
"get-intrinsic": "^1.1.3"
|
728 |
+
},
|
729 |
+
"funding": {
|
730 |
+
"url": "https://github.com/sponsors/ljharb"
|
731 |
+
}
|
732 |
+
},
|
733 |
+
"node_modules/groq-sdk": {
|
734 |
+
"version": "0.7.0",
|
735 |
+
"resolved": "https://registry.npmjs.org/groq-sdk/-/groq-sdk-0.7.0.tgz",
|
736 |
+
"integrity": "sha512-OgPqrRtti5MjEVclR8sgBHrhSkTLdFCmi47yrEF29uJZaiCkX3s7bXpnMhq8Lwoe1f4AwgC0qGOeHXpeSgu5lg==",
|
737 |
+
"license": "Apache-2.0",
|
738 |
+
"dependencies": {
|
739 |
+
"@types/node": "^18.11.18",
|
740 |
+
"@types/node-fetch": "^2.6.4",
|
741 |
+
"abort-controller": "^3.0.0",
|
742 |
+
"agentkeepalive": "^4.2.1",
|
743 |
+
"form-data-encoder": "1.7.2",
|
744 |
+
"formdata-node": "^4.3.2",
|
745 |
+
"node-fetch": "^2.6.7"
|
746 |
+
}
|
747 |
+
},
|
748 |
+
"node_modules/has-flag": {
|
749 |
+
"version": "3.0.0",
|
750 |
+
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
751 |
+
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
|
752 |
+
"dev": true,
|
753 |
+
"license": "MIT",
|
754 |
+
"engines": {
|
755 |
+
"node": ">=4"
|
756 |
+
}
|
757 |
+
},
|
758 |
+
"node_modules/has-property-descriptors": {
|
759 |
+
"version": "1.0.2",
|
760 |
+
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
761 |
+
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
762 |
+
"license": "MIT",
|
763 |
+
"dependencies": {
|
764 |
+
"es-define-property": "^1.0.0"
|
765 |
+
},
|
766 |
+
"funding": {
|
767 |
+
"url": "https://github.com/sponsors/ljharb"
|
768 |
+
}
|
769 |
+
},
|
770 |
+
"node_modules/has-proto": {
|
771 |
+
"version": "1.0.3",
|
772 |
+
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
|
773 |
+
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
|
774 |
+
"license": "MIT",
|
775 |
+
"engines": {
|
776 |
+
"node": ">= 0.4"
|
777 |
+
},
|
778 |
+
"funding": {
|
779 |
+
"url": "https://github.com/sponsors/ljharb"
|
780 |
+
}
|
781 |
+
},
|
782 |
+
"node_modules/has-symbols": {
|
783 |
+
"version": "1.0.3",
|
784 |
+
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
785 |
+
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
786 |
+
"license": "MIT",
|
787 |
+
"engines": {
|
788 |
+
"node": ">= 0.4"
|
789 |
+
},
|
790 |
+
"funding": {
|
791 |
+
"url": "https://github.com/sponsors/ljharb"
|
792 |
+
}
|
793 |
+
},
|
794 |
+
"node_modules/hasown": {
|
795 |
+
"version": "2.0.2",
|
796 |
+
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
797 |
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
798 |
+
"license": "MIT",
|
799 |
+
"dependencies": {
|
800 |
+
"function-bind": "^1.1.2"
|
801 |
+
},
|
802 |
+
"engines": {
|
803 |
+
"node": ">= 0.4"
|
804 |
+
}
|
805 |
+
},
|
806 |
+
"node_modules/http-errors": {
|
807 |
+
"version": "2.0.0",
|
808 |
+
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
809 |
+
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
810 |
+
"license": "MIT",
|
811 |
+
"dependencies": {
|
812 |
+
"depd": "2.0.0",
|
813 |
+
"inherits": "2.0.4",
|
814 |
+
"setprototypeof": "1.2.0",
|
815 |
+
"statuses": "2.0.1",
|
816 |
+
"toidentifier": "1.0.1"
|
817 |
+
},
|
818 |
+
"engines": {
|
819 |
+
"node": ">= 0.8"
|
820 |
+
}
|
821 |
+
},
|
822 |
+
"node_modules/humanize-ms": {
|
823 |
+
"version": "1.2.1",
|
824 |
+
"resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
|
825 |
+
"integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
|
826 |
+
"license": "MIT",
|
827 |
+
"dependencies": {
|
828 |
+
"ms": "^2.0.0"
|
829 |
+
}
|
830 |
+
},
|
831 |
+
"node_modules/iconv-lite": {
|
832 |
+
"version": "0.4.24",
|
833 |
+
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
834 |
+
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
835 |
+
"license": "MIT",
|
836 |
+
"dependencies": {
|
837 |
+
"safer-buffer": ">= 2.1.2 < 3"
|
838 |
+
},
|
839 |
+
"engines": {
|
840 |
+
"node": ">=0.10.0"
|
841 |
+
}
|
842 |
+
},
|
843 |
+
"node_modules/ignore-by-default": {
|
844 |
+
"version": "1.0.1",
|
845 |
+
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
|
846 |
+
"integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
|
847 |
+
"dev": true,
|
848 |
+
"license": "ISC"
|
849 |
+
},
|
850 |
+
"node_modules/inherits": {
|
851 |
+
"version": "2.0.4",
|
852 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
853 |
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
854 |
+
"license": "ISC"
|
855 |
+
},
|
856 |
+
"node_modules/ipaddr.js": {
|
857 |
+
"version": "1.9.1",
|
858 |
+
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
859 |
+
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
860 |
+
"license": "MIT",
|
861 |
+
"engines": {
|
862 |
+
"node": ">= 0.10"
|
863 |
+
}
|
864 |
+
},
|
865 |
+
"node_modules/is-binary-path": {
|
866 |
+
"version": "2.1.0",
|
867 |
+
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
868 |
+
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
869 |
+
"dev": true,
|
870 |
+
"license": "MIT",
|
871 |
+
"dependencies": {
|
872 |
+
"binary-extensions": "^2.0.0"
|
873 |
+
},
|
874 |
+
"engines": {
|
875 |
+
"node": ">=8"
|
876 |
+
}
|
877 |
+
},
|
878 |
+
"node_modules/is-extglob": {
|
879 |
+
"version": "2.1.1",
|
880 |
+
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
881 |
+
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
|
882 |
+
"dev": true,
|
883 |
+
"license": "MIT",
|
884 |
+
"engines": {
|
885 |
+
"node": ">=0.10.0"
|
886 |
+
}
|
887 |
+
},
|
888 |
+
"node_modules/is-glob": {
|
889 |
+
"version": "4.0.3",
|
890 |
+
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
891 |
+
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
|
892 |
+
"dev": true,
|
893 |
+
"license": "MIT",
|
894 |
+
"dependencies": {
|
895 |
+
"is-extglob": "^2.1.1"
|
896 |
+
},
|
897 |
+
"engines": {
|
898 |
+
"node": ">=0.10.0"
|
899 |
+
}
|
900 |
+
},
|
901 |
+
"node_modules/is-number": {
|
902 |
+
"version": "7.0.0",
|
903 |
+
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
904 |
+
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
905 |
+
"dev": true,
|
906 |
+
"license": "MIT",
|
907 |
+
"engines": {
|
908 |
+
"node": ">=0.12.0"
|
909 |
+
}
|
910 |
+
},
|
911 |
+
"node_modules/media-typer": {
|
912 |
+
"version": "0.3.0",
|
913 |
+
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
914 |
+
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
|
915 |
+
"license": "MIT",
|
916 |
+
"engines": {
|
917 |
+
"node": ">= 0.6"
|
918 |
+
}
|
919 |
+
},
|
920 |
+
"node_modules/merge-descriptors": {
|
921 |
+
"version": "1.0.3",
|
922 |
+
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
|
923 |
+
"integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
|
924 |
+
"license": "MIT",
|
925 |
+
"funding": {
|
926 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
927 |
+
}
|
928 |
+
},
|
929 |
+
"node_modules/methods": {
|
930 |
+
"version": "1.1.2",
|
931 |
+
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
932 |
+
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
|
933 |
+
"license": "MIT",
|
934 |
+
"engines": {
|
935 |
+
"node": ">= 0.6"
|
936 |
+
}
|
937 |
+
},
|
938 |
+
"node_modules/mime": {
|
939 |
+
"version": "1.6.0",
|
940 |
+
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
941 |
+
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
|
942 |
+
"license": "MIT",
|
943 |
+
"bin": {
|
944 |
+
"mime": "cli.js"
|
945 |
+
},
|
946 |
+
"engines": {
|
947 |
+
"node": ">=4"
|
948 |
+
}
|
949 |
+
},
|
950 |
+
"node_modules/mime-db": {
|
951 |
+
"version": "1.52.0",
|
952 |
+
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
953 |
+
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
954 |
+
"license": "MIT",
|
955 |
+
"engines": {
|
956 |
+
"node": ">= 0.6"
|
957 |
+
}
|
958 |
+
},
|
959 |
+
"node_modules/mime-types": {
|
960 |
+
"version": "2.1.35",
|
961 |
+
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
962 |
+
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
963 |
+
"license": "MIT",
|
964 |
+
"dependencies": {
|
965 |
+
"mime-db": "1.52.0"
|
966 |
+
},
|
967 |
+
"engines": {
|
968 |
+
"node": ">= 0.6"
|
969 |
+
}
|
970 |
+
},
|
971 |
+
"node_modules/minimatch": {
|
972 |
+
"version": "3.1.2",
|
973 |
+
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
974 |
+
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
975 |
+
"dev": true,
|
976 |
+
"license": "ISC",
|
977 |
+
"dependencies": {
|
978 |
+
"brace-expansion": "^1.1.7"
|
979 |
+
},
|
980 |
+
"engines": {
|
981 |
+
"node": "*"
|
982 |
+
}
|
983 |
+
},
|
984 |
+
"node_modules/ms": {
|
985 |
+
"version": "2.1.3",
|
986 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
987 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
988 |
+
"license": "MIT"
|
989 |
+
},
|
990 |
+
"node_modules/negotiator": {
|
991 |
+
"version": "0.6.3",
|
992 |
+
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
993 |
+
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
|
994 |
+
"license": "MIT",
|
995 |
+
"engines": {
|
996 |
+
"node": ">= 0.6"
|
997 |
+
}
|
998 |
+
},
|
999 |
+
"node_modules/node-domexception": {
|
1000 |
+
"version": "1.0.0",
|
1001 |
+
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
|
1002 |
+
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
|
1003 |
+
"funding": [
|
1004 |
+
{
|
1005 |
+
"type": "github",
|
1006 |
+
"url": "https://github.com/sponsors/jimmywarting"
|
1007 |
+
},
|
1008 |
+
{
|
1009 |
+
"type": "github",
|
1010 |
+
"url": "https://paypal.me/jimmywarting"
|
1011 |
+
}
|
1012 |
+
],
|
1013 |
+
"license": "MIT",
|
1014 |
+
"engines": {
|
1015 |
+
"node": ">=10.5.0"
|
1016 |
+
}
|
1017 |
+
},
|
1018 |
+
"node_modules/node-fetch": {
|
1019 |
+
"version": "2.7.0",
|
1020 |
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
1021 |
+
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
1022 |
+
"license": "MIT",
|
1023 |
+
"dependencies": {
|
1024 |
+
"whatwg-url": "^5.0.0"
|
1025 |
+
},
|
1026 |
+
"engines": {
|
1027 |
+
"node": "4.x || >=6.0.0"
|
1028 |
+
},
|
1029 |
+
"peerDependencies": {
|
1030 |
+
"encoding": "^0.1.0"
|
1031 |
+
},
|
1032 |
+
"peerDependenciesMeta": {
|
1033 |
+
"encoding": {
|
1034 |
+
"optional": true
|
1035 |
+
}
|
1036 |
+
}
|
1037 |
+
},
|
1038 |
+
"node_modules/nodemon": {
|
1039 |
+
"version": "3.1.7",
|
1040 |
+
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.7.tgz",
|
1041 |
+
"integrity": "sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==",
|
1042 |
+
"dev": true,
|
1043 |
+
"license": "MIT",
|
1044 |
+
"dependencies": {
|
1045 |
+
"chokidar": "^3.5.2",
|
1046 |
+
"debug": "^4",
|
1047 |
+
"ignore-by-default": "^1.0.1",
|
1048 |
+
"minimatch": "^3.1.2",
|
1049 |
+
"pstree.remy": "^1.1.8",
|
1050 |
+
"semver": "^7.5.3",
|
1051 |
+
"simple-update-notifier": "^2.0.0",
|
1052 |
+
"supports-color": "^5.5.0",
|
1053 |
+
"touch": "^3.1.0",
|
1054 |
+
"undefsafe": "^2.0.5"
|
1055 |
+
},
|
1056 |
+
"bin": {
|
1057 |
+
"nodemon": "bin/nodemon.js"
|
1058 |
+
},
|
1059 |
+
"engines": {
|
1060 |
+
"node": ">=10"
|
1061 |
+
},
|
1062 |
+
"funding": {
|
1063 |
+
"type": "opencollective",
|
1064 |
+
"url": "https://opencollective.com/nodemon"
|
1065 |
+
}
|
1066 |
+
},
|
1067 |
+
"node_modules/normalize-path": {
|
1068 |
+
"version": "3.0.0",
|
1069 |
+
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
1070 |
+
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
|
1071 |
+
"dev": true,
|
1072 |
+
"license": "MIT",
|
1073 |
+
"engines": {
|
1074 |
+
"node": ">=0.10.0"
|
1075 |
+
}
|
1076 |
+
},
|
1077 |
+
"node_modules/object-assign": {
|
1078 |
+
"version": "4.1.1",
|
1079 |
+
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
1080 |
+
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
1081 |
+
"license": "MIT",
|
1082 |
+
"engines": {
|
1083 |
+
"node": ">=0.10.0"
|
1084 |
+
}
|
1085 |
+
},
|
1086 |
+
"node_modules/object-inspect": {
|
1087 |
+
"version": "1.13.2",
|
1088 |
+
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
|
1089 |
+
"integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==",
|
1090 |
+
"license": "MIT",
|
1091 |
+
"engines": {
|
1092 |
+
"node": ">= 0.4"
|
1093 |
+
},
|
1094 |
+
"funding": {
|
1095 |
+
"url": "https://github.com/sponsors/ljharb"
|
1096 |
+
}
|
1097 |
+
},
|
1098 |
+
"node_modules/ollama": {
|
1099 |
+
"version": "0.5.9",
|
1100 |
+
"resolved": "https://registry.npmjs.org/ollama/-/ollama-0.5.9.tgz",
|
1101 |
+
"integrity": "sha512-F/KZuDRC+ZsVCuMvcOYuQ6zj42/idzCkkuknGyyGVmNStMZ/sU3jQpvhnl4SyC0+zBzLiKNZJnJeuPFuieWZvQ==",
|
1102 |
+
"license": "MIT",
|
1103 |
+
"dependencies": {
|
1104 |
+
"whatwg-fetch": "^3.6.20"
|
1105 |
+
}
|
1106 |
+
},
|
1107 |
+
"node_modules/on-finished": {
|
1108 |
+
"version": "2.4.1",
|
1109 |
+
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
1110 |
+
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
1111 |
+
"license": "MIT",
|
1112 |
+
"dependencies": {
|
1113 |
+
"ee-first": "1.1.1"
|
1114 |
+
},
|
1115 |
+
"engines": {
|
1116 |
+
"node": ">= 0.8"
|
1117 |
+
}
|
1118 |
+
},
|
1119 |
+
"node_modules/parseurl": {
|
1120 |
+
"version": "1.3.3",
|
1121 |
+
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
1122 |
+
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
1123 |
+
"license": "MIT",
|
1124 |
+
"engines": {
|
1125 |
+
"node": ">= 0.8"
|
1126 |
+
}
|
1127 |
+
},
|
1128 |
+
"node_modules/path-to-regexp": {
|
1129 |
+
"version": "0.1.10",
|
1130 |
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz",
|
1131 |
+
"integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==",
|
1132 |
+
"license": "MIT"
|
1133 |
+
},
|
1134 |
+
"node_modules/picomatch": {
|
1135 |
+
"version": "2.3.1",
|
1136 |
+
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
1137 |
+
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
1138 |
+
"dev": true,
|
1139 |
+
"license": "MIT",
|
1140 |
+
"engines": {
|
1141 |
+
"node": ">=8.6"
|
1142 |
+
},
|
1143 |
+
"funding": {
|
1144 |
+
"url": "https://github.com/sponsors/jonschlinkert"
|
1145 |
+
}
|
1146 |
+
},
|
1147 |
+
"node_modules/proxy-addr": {
|
1148 |
+
"version": "2.0.7",
|
1149 |
+
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
1150 |
+
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
1151 |
+
"license": "MIT",
|
1152 |
+
"dependencies": {
|
1153 |
+
"forwarded": "0.2.0",
|
1154 |
+
"ipaddr.js": "1.9.1"
|
1155 |
+
},
|
1156 |
+
"engines": {
|
1157 |
+
"node": ">= 0.10"
|
1158 |
+
}
|
1159 |
+
},
|
1160 |
+
"node_modules/pstree.remy": {
|
1161 |
+
"version": "1.1.8",
|
1162 |
+
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
|
1163 |
+
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
|
1164 |
+
"dev": true,
|
1165 |
+
"license": "MIT"
|
1166 |
+
},
|
1167 |
+
"node_modules/qs": {
|
1168 |
+
"version": "6.13.0",
|
1169 |
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
|
1170 |
+
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
|
1171 |
+
"license": "BSD-3-Clause",
|
1172 |
+
"dependencies": {
|
1173 |
+
"side-channel": "^1.0.6"
|
1174 |
+
},
|
1175 |
+
"engines": {
|
1176 |
+
"node": ">=0.6"
|
1177 |
+
},
|
1178 |
+
"funding": {
|
1179 |
+
"url": "https://github.com/sponsors/ljharb"
|
1180 |
+
}
|
1181 |
+
},
|
1182 |
+
"node_modules/range-parser": {
|
1183 |
+
"version": "1.2.1",
|
1184 |
+
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
1185 |
+
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
1186 |
+
"license": "MIT",
|
1187 |
+
"engines": {
|
1188 |
+
"node": ">= 0.6"
|
1189 |
+
}
|
1190 |
+
},
|
1191 |
+
"node_modules/raw-body": {
|
1192 |
+
"version": "2.5.2",
|
1193 |
+
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
|
1194 |
+
"integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
|
1195 |
+
"license": "MIT",
|
1196 |
+
"dependencies": {
|
1197 |
+
"bytes": "3.1.2",
|
1198 |
+
"http-errors": "2.0.0",
|
1199 |
+
"iconv-lite": "0.4.24",
|
1200 |
+
"unpipe": "1.0.0"
|
1201 |
+
},
|
1202 |
+
"engines": {
|
1203 |
+
"node": ">= 0.8"
|
1204 |
+
}
|
1205 |
+
},
|
1206 |
+
"node_modules/readdirp": {
|
1207 |
+
"version": "3.6.0",
|
1208 |
+
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
1209 |
+
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
1210 |
+
"dev": true,
|
1211 |
+
"license": "MIT",
|
1212 |
+
"dependencies": {
|
1213 |
+
"picomatch": "^2.2.1"
|
1214 |
+
},
|
1215 |
+
"engines": {
|
1216 |
+
"node": ">=8.10.0"
|
1217 |
+
}
|
1218 |
+
},
|
1219 |
+
"node_modules/safe-buffer": {
|
1220 |
+
"version": "5.2.1",
|
1221 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
1222 |
+
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
1223 |
+
"funding": [
|
1224 |
+
{
|
1225 |
+
"type": "github",
|
1226 |
+
"url": "https://github.com/sponsors/feross"
|
1227 |
+
},
|
1228 |
+
{
|
1229 |
+
"type": "patreon",
|
1230 |
+
"url": "https://www.patreon.com/feross"
|
1231 |
+
},
|
1232 |
+
{
|
1233 |
+
"type": "consulting",
|
1234 |
+
"url": "https://feross.org/support"
|
1235 |
+
}
|
1236 |
+
],
|
1237 |
+
"license": "MIT"
|
1238 |
+
},
|
1239 |
+
"node_modules/safer-buffer": {
|
1240 |
+
"version": "2.1.2",
|
1241 |
+
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
1242 |
+
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
1243 |
+
"license": "MIT"
|
1244 |
+
},
|
1245 |
+
"node_modules/semver": {
|
1246 |
+
"version": "7.6.3",
|
1247 |
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
1248 |
+
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
|
1249 |
+
"dev": true,
|
1250 |
+
"license": "ISC",
|
1251 |
+
"bin": {
|
1252 |
+
"semver": "bin/semver.js"
|
1253 |
+
},
|
1254 |
+
"engines": {
|
1255 |
+
"node": ">=10"
|
1256 |
+
}
|
1257 |
+
},
|
1258 |
+
"node_modules/send": {
|
1259 |
+
"version": "0.19.0",
|
1260 |
+
"resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
|
1261 |
+
"integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
|
1262 |
+
"license": "MIT",
|
1263 |
+
"dependencies": {
|
1264 |
+
"debug": "2.6.9",
|
1265 |
+
"depd": "2.0.0",
|
1266 |
+
"destroy": "1.2.0",
|
1267 |
+
"encodeurl": "~1.0.2",
|
1268 |
+
"escape-html": "~1.0.3",
|
1269 |
+
"etag": "~1.8.1",
|
1270 |
+
"fresh": "0.5.2",
|
1271 |
+
"http-errors": "2.0.0",
|
1272 |
+
"mime": "1.6.0",
|
1273 |
+
"ms": "2.1.3",
|
1274 |
+
"on-finished": "2.4.1",
|
1275 |
+
"range-parser": "~1.2.1",
|
1276 |
+
"statuses": "2.0.1"
|
1277 |
+
},
|
1278 |
+
"engines": {
|
1279 |
+
"node": ">= 0.8.0"
|
1280 |
+
}
|
1281 |
+
},
|
1282 |
+
"node_modules/send/node_modules/debug": {
|
1283 |
+
"version": "2.6.9",
|
1284 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
1285 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
1286 |
+
"license": "MIT",
|
1287 |
+
"dependencies": {
|
1288 |
+
"ms": "2.0.0"
|
1289 |
+
}
|
1290 |
+
},
|
1291 |
+
"node_modules/send/node_modules/debug/node_modules/ms": {
|
1292 |
+
"version": "2.0.0",
|
1293 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
1294 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
1295 |
+
"license": "MIT"
|
1296 |
+
},
|
1297 |
+
"node_modules/send/node_modules/encodeurl": {
|
1298 |
+
"version": "1.0.2",
|
1299 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
1300 |
+
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
1301 |
+
"license": "MIT",
|
1302 |
+
"engines": {
|
1303 |
+
"node": ">= 0.8"
|
1304 |
+
}
|
1305 |
+
},
|
1306 |
+
"node_modules/serve-static": {
|
1307 |
+
"version": "1.16.2",
|
1308 |
+
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
|
1309 |
+
"integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
|
1310 |
+
"license": "MIT",
|
1311 |
+
"dependencies": {
|
1312 |
+
"encodeurl": "~2.0.0",
|
1313 |
+
"escape-html": "~1.0.3",
|
1314 |
+
"parseurl": "~1.3.3",
|
1315 |
+
"send": "0.19.0"
|
1316 |
+
},
|
1317 |
+
"engines": {
|
1318 |
+
"node": ">= 0.8.0"
|
1319 |
+
}
|
1320 |
+
},
|
1321 |
+
"node_modules/set-function-length": {
|
1322 |
+
"version": "1.2.2",
|
1323 |
+
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
1324 |
+
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
1325 |
+
"license": "MIT",
|
1326 |
+
"dependencies": {
|
1327 |
+
"define-data-property": "^1.1.4",
|
1328 |
+
"es-errors": "^1.3.0",
|
1329 |
+
"function-bind": "^1.1.2",
|
1330 |
+
"get-intrinsic": "^1.2.4",
|
1331 |
+
"gopd": "^1.0.1",
|
1332 |
+
"has-property-descriptors": "^1.0.2"
|
1333 |
+
},
|
1334 |
+
"engines": {
|
1335 |
+
"node": ">= 0.4"
|
1336 |
+
}
|
1337 |
+
},
|
1338 |
+
"node_modules/setprototypeof": {
|
1339 |
+
"version": "1.2.0",
|
1340 |
+
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
1341 |
+
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
|
1342 |
+
"license": "ISC"
|
1343 |
+
},
|
1344 |
+
"node_modules/side-channel": {
|
1345 |
+
"version": "1.0.6",
|
1346 |
+
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
|
1347 |
+
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
|
1348 |
+
"license": "MIT",
|
1349 |
+
"dependencies": {
|
1350 |
+
"call-bind": "^1.0.7",
|
1351 |
+
"es-errors": "^1.3.0",
|
1352 |
+
"get-intrinsic": "^1.2.4",
|
1353 |
+
"object-inspect": "^1.13.1"
|
1354 |
+
},
|
1355 |
+
"engines": {
|
1356 |
+
"node": ">= 0.4"
|
1357 |
+
},
|
1358 |
+
"funding": {
|
1359 |
+
"url": "https://github.com/sponsors/ljharb"
|
1360 |
+
}
|
1361 |
+
},
|
1362 |
+
"node_modules/simple-update-notifier": {
|
1363 |
+
"version": "2.0.0",
|
1364 |
+
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
|
1365 |
+
"integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
|
1366 |
+
"dev": true,
|
1367 |
+
"license": "MIT",
|
1368 |
+
"dependencies": {
|
1369 |
+
"semver": "^7.5.3"
|
1370 |
+
},
|
1371 |
+
"engines": {
|
1372 |
+
"node": ">=10"
|
1373 |
+
}
|
1374 |
+
},
|
1375 |
+
"node_modules/socket.io": {
|
1376 |
+
"version": "4.8.0",
|
1377 |
+
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.0.tgz",
|
1378 |
+
"integrity": "sha512-8U6BEgGjQOfGz3HHTYaC/L1GaxDCJ/KM0XTkJly0EhZ5U/du9uNEZy4ZgYzEzIqlx2CMm25CrCqr1ck899eLNA==",
|
1379 |
+
"license": "MIT",
|
1380 |
+
"dependencies": {
|
1381 |
+
"accepts": "~1.3.4",
|
1382 |
+
"base64id": "~2.0.0",
|
1383 |
+
"cors": "~2.8.5",
|
1384 |
+
"debug": "~4.3.2",
|
1385 |
+
"engine.io": "~6.6.0",
|
1386 |
+
"socket.io-adapter": "~2.5.2",
|
1387 |
+
"socket.io-parser": "~4.2.4"
|
1388 |
+
},
|
1389 |
+
"engines": {
|
1390 |
+
"node": ">=10.2.0"
|
1391 |
+
}
|
1392 |
+
},
|
1393 |
+
"node_modules/socket.io-adapter": {
|
1394 |
+
"version": "2.5.5",
|
1395 |
+
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz",
|
1396 |
+
"integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==",
|
1397 |
+
"license": "MIT",
|
1398 |
+
"dependencies": {
|
1399 |
+
"debug": "~4.3.4",
|
1400 |
+
"ws": "~8.17.1"
|
1401 |
+
}
|
1402 |
+
},
|
1403 |
+
"node_modules/socket.io-parser": {
|
1404 |
+
"version": "4.2.4",
|
1405 |
+
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz",
|
1406 |
+
"integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
|
1407 |
+
"license": "MIT",
|
1408 |
+
"dependencies": {
|
1409 |
+
"@socket.io/component-emitter": "~3.1.0",
|
1410 |
+
"debug": "~4.3.1"
|
1411 |
+
},
|
1412 |
+
"engines": {
|
1413 |
+
"node": ">=10.0.0"
|
1414 |
+
}
|
1415 |
+
},
|
1416 |
+
"node_modules/statuses": {
|
1417 |
+
"version": "2.0.1",
|
1418 |
+
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
1419 |
+
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
1420 |
+
"license": "MIT",
|
1421 |
+
"engines": {
|
1422 |
+
"node": ">= 0.8"
|
1423 |
+
}
|
1424 |
+
},
|
1425 |
+
"node_modules/supports-color": {
|
1426 |
+
"version": "5.5.0",
|
1427 |
+
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
1428 |
+
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
1429 |
+
"dev": true,
|
1430 |
+
"license": "MIT",
|
1431 |
+
"dependencies": {
|
1432 |
+
"has-flag": "^3.0.0"
|
1433 |
+
},
|
1434 |
+
"engines": {
|
1435 |
+
"node": ">=4"
|
1436 |
+
}
|
1437 |
+
},
|
1438 |
+
"node_modules/to-regex-range": {
|
1439 |
+
"version": "5.0.1",
|
1440 |
+
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
1441 |
+
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
1442 |
+
"dev": true,
|
1443 |
+
"license": "MIT",
|
1444 |
+
"dependencies": {
|
1445 |
+
"is-number": "^7.0.0"
|
1446 |
+
},
|
1447 |
+
"engines": {
|
1448 |
+
"node": ">=8.0"
|
1449 |
+
}
|
1450 |
+
},
|
1451 |
+
"node_modules/toidentifier": {
|
1452 |
+
"version": "1.0.1",
|
1453 |
+
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
1454 |
+
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
1455 |
+
"license": "MIT",
|
1456 |
+
"engines": {
|
1457 |
+
"node": ">=0.6"
|
1458 |
+
}
|
1459 |
+
},
|
1460 |
+
"node_modules/touch": {
|
1461 |
+
"version": "3.1.1",
|
1462 |
+
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz",
|
1463 |
+
"integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==",
|
1464 |
+
"dev": true,
|
1465 |
+
"license": "ISC",
|
1466 |
+
"bin": {
|
1467 |
+
"nodetouch": "bin/nodetouch.js"
|
1468 |
+
}
|
1469 |
+
},
|
1470 |
+
"node_modules/tr46": {
|
1471 |
+
"version": "0.0.3",
|
1472 |
+
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
1473 |
+
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
1474 |
+
"license": "MIT"
|
1475 |
+
},
|
1476 |
+
"node_modules/type-is": {
|
1477 |
+
"version": "1.6.18",
|
1478 |
+
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
1479 |
+
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
1480 |
+
"license": "MIT",
|
1481 |
+
"dependencies": {
|
1482 |
+
"media-typer": "0.3.0",
|
1483 |
+
"mime-types": "~2.1.24"
|
1484 |
+
},
|
1485 |
+
"engines": {
|
1486 |
+
"node": ">= 0.6"
|
1487 |
+
}
|
1488 |
+
},
|
1489 |
+
"node_modules/undefsafe": {
|
1490 |
+
"version": "2.0.5",
|
1491 |
+
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
|
1492 |
+
"integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
|
1493 |
+
"dev": true,
|
1494 |
+
"license": "MIT"
|
1495 |
+
},
|
1496 |
+
"node_modules/undici-types": {
|
1497 |
+
"version": "5.26.5",
|
1498 |
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
1499 |
+
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
1500 |
+
"license": "MIT"
|
1501 |
+
},
|
1502 |
+
"node_modules/unpipe": {
|
1503 |
+
"version": "1.0.0",
|
1504 |
+
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
1505 |
+
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
1506 |
+
"license": "MIT",
|
1507 |
+
"engines": {
|
1508 |
+
"node": ">= 0.8"
|
1509 |
+
}
|
1510 |
+
},
|
1511 |
+
"node_modules/utils-merge": {
|
1512 |
+
"version": "1.0.1",
|
1513 |
+
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
1514 |
+
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
|
1515 |
+
"license": "MIT",
|
1516 |
+
"engines": {
|
1517 |
+
"node": ">= 0.4.0"
|
1518 |
+
}
|
1519 |
+
},
|
1520 |
+
"node_modules/vary": {
|
1521 |
+
"version": "1.1.2",
|
1522 |
+
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
1523 |
+
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
1524 |
+
"license": "MIT",
|
1525 |
+
"engines": {
|
1526 |
+
"node": ">= 0.8"
|
1527 |
+
}
|
1528 |
+
},
|
1529 |
+
"node_modules/web-streams-polyfill": {
|
1530 |
+
"version": "4.0.0-beta.3",
|
1531 |
+
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz",
|
1532 |
+
"integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==",
|
1533 |
+
"license": "MIT",
|
1534 |
+
"engines": {
|
1535 |
+
"node": ">= 14"
|
1536 |
+
}
|
1537 |
+
},
|
1538 |
+
"node_modules/webidl-conversions": {
|
1539 |
+
"version": "3.0.1",
|
1540 |
+
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
1541 |
+
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
|
1542 |
+
"license": "BSD-2-Clause"
|
1543 |
+
},
|
1544 |
+
"node_modules/whatwg-fetch": {
|
1545 |
+
"version": "3.6.20",
|
1546 |
+
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz",
|
1547 |
+
"integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==",
|
1548 |
+
"license": "MIT"
|
1549 |
+
},
|
1550 |
+
"node_modules/whatwg-url": {
|
1551 |
+
"version": "5.0.0",
|
1552 |
+
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
1553 |
+
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
1554 |
+
"license": "MIT",
|
1555 |
+
"dependencies": {
|
1556 |
+
"tr46": "~0.0.3",
|
1557 |
+
"webidl-conversions": "^3.0.0"
|
1558 |
+
}
|
1559 |
+
},
|
1560 |
+
"node_modules/ws": {
|
1561 |
+
"version": "8.17.1",
|
1562 |
+
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
1563 |
+
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
1564 |
+
"license": "MIT",
|
1565 |
+
"engines": {
|
1566 |
+
"node": ">=10.0.0"
|
1567 |
+
},
|
1568 |
+
"peerDependencies": {
|
1569 |
+
"bufferutil": "^4.0.1",
|
1570 |
+
"utf-8-validate": ">=5.0.2"
|
1571 |
+
},
|
1572 |
+
"peerDependenciesMeta": {
|
1573 |
+
"bufferutil": {
|
1574 |
+
"optional": true
|
1575 |
+
},
|
1576 |
+
"utf-8-validate": {
|
1577 |
+
"optional": true
|
1578 |
+
}
|
1579 |
+
}
|
1580 |
+
}
|
1581 |
+
}
|
1582 |
+
}
|
package.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "llmchain",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"main": "index.js",
|
5 |
+
"scripts": {
|
6 |
+
"start": "nodemon server.js",
|
7 |
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8 |
+
},
|
9 |
+
"keywords": [],
|
10 |
+
"author": "",
|
11 |
+
"license": "ISC",
|
12 |
+
"description": "",
|
13 |
+
"dependencies": {
|
14 |
+
"dotenv": "^16.4.5",
|
15 |
+
"express": "^4.21.1",
|
16 |
+
"groq-sdk": "^0.7.0",
|
17 |
+
"ollama": "^0.5.9",
|
18 |
+
"socket.io": "^4.8.0"
|
19 |
+
},
|
20 |
+
"devDependencies": {
|
21 |
+
"nodemon": "^3.1.7"
|
22 |
+
}
|
23 |
+
}
|
response_raw.json
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
```json
|
4 |
+
{
|
5 |
+
"title": "Analyzing Problem Requirements and Constraints",
|
6 |
+
"content": "We need to perform k multiplication operations on the given array nums with a multiplier, and then apply modulo 10^9 + 7 to every value in nums. The key elements that will guide our solution process are the array nums, the number of operations k, the multiplier, and the modulo operation. We also need to identify the minimum value in nums for each operation. Given the constraints on the input values, we can determine the potential range of the output values.",
|
7 |
+
"next_action": "continue"
|
8 |
+
}
|
9 |
+
```
|
10 |
+
|
11 |
+
```json
|
12 |
+
{
|
13 |
+
"title": "Identifying the Appropriate Data Structure",
|
14 |
+
"content": "To efficiently find the minimum value in the array for each operation, we can utilize a priority queue data structure. The priority queue will allow us to maintain the smallest element at the front of the queue, making it easily accessible for each operation.",
|
15 |
+
"next_action": "continue"
|
16 |
+
}
|
17 |
+
```
|
18 |
+
|
19 |
+
```json
|
20 |
+
{
|
21 |
+
"title": "Simulating the Multiplication Operations",
|
22 |
+
"content": "We can simulate the k multiplication operations by repeatedly removing the minimum value from the priority queue, multiplying it by the multiplier, and then adding the result back to the queue. This process will be repeated k times. However, to avoid dealing with extremely large numbers, we can apply the modulo operation during each multiplication step to prevent overflow.",
|
23 |
+
"next_action": "continue"
|
24 |
+
}
|
25 |
+
```
|
26 |
+
|
27 |
+
```json
|
28 |
+
{
|
29 |
+
"title": "Considering Alternative Approaches",
|
30 |
+
"content": "Another approach to solve this problem is to use a sorting-based method. We can sort the array nums in ascending order and then perform the k multiplication operations on the smallest elements. However, this approach may not be as efficient as the priority queue-based method, especially for large inputs. We can also explore the possibility of using a hash-based data structure to store the elements and their frequencies, but this approach may not be as efficient as the priority queue-based method.",
|
31 |
+
"next_action": "continue"
|
32 |
+
}
|
33 |
+
```
|
34 |
+
|
35 |
+
```json
|
36 |
+
{
|
37 |
+
"title": "Re-examining the Problem with a Priority Queue-Based Method",
|
38 |
+
"content": "Let's re-examine the problem using the priority queue-based method. We can create a priority queue and add all elements from the array nums to the queue. Then, we can simulate the k multiplication operations by repeatedly removing the minimum value from the queue, multiplying it by the multiplier, applying the modulo operation, and adding the result back to the queue.",
|
39 |
+
"next_action": "continue"
|
40 |
+
}
|
41 |
+
```
|
42 |
+
|
43 |
+
```json
|
44 |
+
{
|
45 |
+
"title": "Implementing the Solution",
|
46 |
+
"content": "We can implement the solution using the priority queue-based method. We can use a programming language such as Python to implement the solution. The key steps in the implementation will be creating the priority queue, simulating the k multiplication operations, and applying the modulo operation during each multiplication step.",
|
47 |
+
"next_action": "final_answer"
|
48 |
+
}
|
49 |
+
```
|
50 |
+
|
51 |
+
Note: The implementation of the solution is not provided here, but it can be implemented using a programming language such as Python.
|
52 |
+
|
53 |
+
Final Answer: The final array state after k multiplication operations can be obtained by implementing the solution using the priority queue-based method.
|
server.js
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const http = require('http');
|
3 |
+
const { Server } = require('socket.io');
|
4 |
+
const { default: Groq } = require('groq-sdk');
|
5 |
+
require('dotenv').config()
|
6 |
+
|
7 |
+
const app = express();
|
8 |
+
const server = http.createServer(app);
|
9 |
+
const io = new Server(server, {
|
10 |
+
cors: {
|
11 |
+
origin: '*',
|
12 |
+
methods: ['GET', 'POST'],
|
13 |
+
},
|
14 |
+
});
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
async function makeApiCall(messages, max_tokens, is_final_answer = false) {
|
19 |
+
for (let attempt = 0; attempt < 3; attempt++) {
|
20 |
+
try {
|
21 |
+
var apiKeys = process.env.GROK_API_KEYS;
|
22 |
+
apiKeys = apiKeys.split(',');
|
23 |
+
const randomIndex = Math.floor(Math.random() * apiKeys.length);
|
24 |
+
const randomKey = apiKeys[randomIndex];
|
25 |
+
|
26 |
+
|
27 |
+
const groq = new Groq({ apiKey: randomKey });
|
28 |
+
|
29 |
+
const response = await groq.chat.completions.create({
|
30 |
+
model: "llama-3.1-70b-versatile", // Update if needed
|
31 |
+
messages: messages,
|
32 |
+
max_tokens: max_tokens,
|
33 |
+
temperature: 1,
|
34 |
+
response_format: is_final_answer ? undefined : { type: "json_object" },
|
35 |
+
});
|
36 |
+
|
37 |
+
if (is_final_answer) {
|
38 |
+
return response.choices[0].message.content;
|
39 |
+
} else {
|
40 |
+
return JSON.parse(response.choices[0].message.content);
|
41 |
+
}
|
42 |
+
} catch (e) {
|
43 |
+
if (attempt === 2) {
|
44 |
+
if (is_final_answer) {
|
45 |
+
return { title: "Error", content: `Failed to generate final answer after 3 attempts. Error: ${e}` };
|
46 |
+
} else {
|
47 |
+
return { title: "Error", content: `Failed to generate step after 3 attempts. Error: ${e}`, next_action: "final_answer" };
|
48 |
+
}
|
49 |
+
}
|
50 |
+
console.error("API call failed, retrying...", e);
|
51 |
+
await new Promise(resolve => setTimeout(resolve, 1000)); // Wait 1 second
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
async function chainOfThought(prompt, socket) {
|
58 |
+
const systemMessage = {
|
59 |
+
role: "system",
|
60 |
+
content: `You are an expert AI assistant that explains your reasoning step by step. For each step, provide a title that describes what you're doing in that step, along with the content. Decide if you need another step or if you're ready to give the final answer. Respond in JSON format with 'title', 'content', and 'next_action' (either 'continue' or 'final_answer') keys. USE AS MANY REASONING STEPS AS POSSIBLE. AT LEAST 3. BE AWARE OF YOUR LIMITATIONS AS AN LLM AND WHAT YOU CAN AND CANNOT DO. IN YOUR REASONING, INCLUDE EXPLORATION OF ALTERNATIVE ANSWERS. CONSIDER YOU MAY BE WRONG, AND IF YOU ARE WRONG IN YOUR REASONING, WHERE IT WOULD BE. FULLY TEST ALL OTHER POSSIBILITIES. YOU CAN BE WRONG. WHEN YOU SAY YOU ARE RE-EXAMINING, ACTUALLY RE-EXAMINE, AND USE ANOTHER APPROACH TO DO SO. DO NOT JUST SAY YOU ARE RE-EXAMINING. USE AT LEAST 3 METHODS TO DERIVE THE ANSWER. USE BEST PRACTICES.
|
61 |
+
|
62 |
+
Example of a valid JSON response:
|
63 |
+
\`\`\`json
|
64 |
+
{
|
65 |
+
"title": "Identifying Key Information",
|
66 |
+
"content": "To begin solving this problem, we need to carefully examine the given information and identify the crucial elements that will guide our solution process. This involves...",
|
67 |
+
"next_action": "continue"
|
68 |
+
}
|
69 |
+
\`\`\`
|
70 |
+
`
|
71 |
+
};
|
72 |
+
|
73 |
+
let messages = [
|
74 |
+
systemMessage,
|
75 |
+
{ role: "user", content: prompt },
|
76 |
+
{ role: "assistant", content: "Thank you! I will now think step by step following my instructions, starting at the beginning after decomposing the problem." }
|
77 |
+
];
|
78 |
+
|
79 |
+
let steps = [];
|
80 |
+
let totalThinkingTime = 0;
|
81 |
+
|
82 |
+
|
83 |
+
for (let stepCount = 1; stepCount <= 25; stepCount++) {
|
84 |
+
const startTime = performance.now();
|
85 |
+
let stepData = await makeApiCall(messages, 600);
|
86 |
+
const endTime = performance.now();
|
87 |
+
const thinkingTime = (endTime - startTime) / 1000;
|
88 |
+
totalThinkingTime += thinkingTime;
|
89 |
+
|
90 |
+
const currentStepMarkdown = `### Step ${stepCount}: ${stepData.title}\n\n${stepData.content}\n\n*Thinking Time: ${thinkingTime} seconds*`;
|
91 |
+
|
92 |
+
steps.push([`Step ${stepCount}: ${stepData.title}`, stepData.content, thinkingTime]);
|
93 |
+
messages.push({ role: "assistant", content: JSON.stringify(stepData) });
|
94 |
+
|
95 |
+
socket.emit('thoughtStep', currentStepMarkdown);
|
96 |
+
|
97 |
+
if (stepData.next_action === 'final_answer') {
|
98 |
+
break;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
messages.push({ role: "user", content: "Please provide the final answer based solely on your reasoning above. Do not use JSON formatting. Only provide the text response without any titles or preambles. Retain any formatting as instructed by the original prompt, such as exact formatting for free response or multiple choice." });
|
103 |
+
const startTimeFinal = performance.now();
|
104 |
+
const finalAnswer = await makeApiCall(messages, 7200, true);
|
105 |
+
const endTimeFinal = performance.now();
|
106 |
+
totalThinkingTime += (endTimeFinal - startTimeFinal) / 1000;
|
107 |
+
|
108 |
+
const finalAnswerMarkdown = `\n${finalAnswer}\n\n*Thinking Time: ${(endTimeFinal - startTimeFinal) / 1000} seconds*`;
|
109 |
+
steps.push(["Final Answer", finalAnswer, (endTimeFinal - startTimeFinal) / 1000]);
|
110 |
+
socket.emit('finalAnswer', finalAnswerMarkdown);
|
111 |
+
console.log(`Total thinking time: ${totalThinkingTime.toFixed(2)} seconds`);
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
io.on('connection', (socket) => {
|
118 |
+
console.log('A user connected');
|
119 |
+
|
120 |
+
socket.on('startChainOfThought', (inputQuestion) => {
|
121 |
+
chainOfThought(inputQuestion, socket);
|
122 |
+
});
|
123 |
+
|
124 |
+
socket.on('disconnect', () => {
|
125 |
+
console.log('User disconnected');
|
126 |
+
});
|
127 |
+
});
|
128 |
+
|
129 |
+
const PORT = process.env.PORT || 7860;
|
130 |
+
server.listen(PORT, () => {
|
131 |
+
console.log(`Server running on port ${PORT}`);
|
132 |
+
});
|
server4bje.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const http = require('http');
|
3 |
+
const { Server } = require('socket.io');
|
4 |
+
const { default: Groq } = require('groq-sdk');
|
5 |
+
require('dotenv').config()
|
6 |
+
|
7 |
+
const app = express();
|
8 |
+
const server = http.createServer(app);
|
9 |
+
const io = new Server(server, {
|
10 |
+
cors: {
|
11 |
+
origin: '*',
|
12 |
+
methods: ['GET', 'POST'],
|
13 |
+
},
|
14 |
+
});
|
15 |
+
|
16 |
+
const groq = new Groq({ apiKey: process.env.GROK_KI_API_KEY }); // Replace with your actual API key
|
17 |
+
|
18 |
+
async function makeApiCall(messages, maxTokens, isFinalAnswer = false) {
|
19 |
+
for (let attempt = 0; attempt < 3; attempt++) {
|
20 |
+
try {
|
21 |
+
const response = await groq.chat.completions.create({
|
22 |
+
model: "llama-3.1-70b-versatile", // Use appropriate model if different
|
23 |
+
messages: messages,
|
24 |
+
max_tokens: maxTokens,
|
25 |
+
temperature: isFinalAnswer ? 0.2 : 0.7, // Adjust temperature as needed
|
26 |
+
response_format: isFinalAnswer ? undefined : { type: "json_object" }
|
27 |
+
});
|
28 |
+
|
29 |
+
if (isFinalAnswer) {
|
30 |
+
return response.choices[0].message.content;
|
31 |
+
} else {
|
32 |
+
return JSON.parse(response.choices[0].message.content);
|
33 |
+
}
|
34 |
+
} catch (e) {
|
35 |
+
if (attempt === 2) {
|
36 |
+
return isFinalAnswer
|
37 |
+
? { title: "Error", content: `Failed to generate final answer after 3 attempts. Error: ${e}` }
|
38 |
+
: { title: "Error", content: `Failed to generate step after 3 attempts. Error: ${e}`, next_action: "final_answer" };
|
39 |
+
}
|
40 |
+
await new Promise(resolve => setTimeout(resolve, 1000)); // Wait 1 second before retrying
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
async function generateResponse(prompt, socket) {
|
48 |
+
const systemMessage = {
|
49 |
+
role: "system",
|
50 |
+
content: `You are an expert AI assistant that explains your reasoning step by step. For each step, provide a title that describes what you're doing in that step, along with the content. Decide if you need another step or if you're ready to give the final answer. Respond in JSON format with 'title', 'content', and 'next_action' (either 'continue' or 'final_answer') keys. USE AS MANY REASONING STEPS AS POSSIBLE. AT LEAST 3. BE AWARE OF YOUR LIMITATIONS AS AN LLM AND WHAT YOU CAN AND CANNOT DO. IN YOUR REASONING, INCLUDE EXPLORATION OF ALTERNATIVE ANSWERS. CONSIDER YOU MAY BE WRONG, AND IF YOU ARE WRONG IN YOUR REASONING, WHERE IT WOULD BE. FULLY TEST ALL OTHER POSSIBILITIES. YOU CAN BE WRONG. WHEN YOU SAY YOU ARE RE-EXAMINING, ACTUALLY RE-EXAMINE, AND USE ANOTHER APPROACH TO DO SO. DO NOT JUST SAY YOU ARE RE-EXAMINING. USE AT LEAST 3 METHODS TO DERIVE THE ANSWER. USE BEST PRACTICES.`
|
51 |
+
};
|
52 |
+
|
53 |
+
let messages = [systemMessage, { role: "user", content: prompt }];
|
54 |
+
let steps = [];
|
55 |
+
let totalThinkingTime = 0;
|
56 |
+
let stepCount = 1;
|
57 |
+
|
58 |
+
|
59 |
+
while (true) {
|
60 |
+
const startTime = performance.now();
|
61 |
+
const stepData = await makeApiCall(messages, 300);
|
62 |
+
const endTime = performance.now();
|
63 |
+
const thinkingTime = (endTime - startTime) / 1000;
|
64 |
+
totalThinkingTime += thinkingTime;
|
65 |
+
|
66 |
+
steps.push({ title: `Step ${stepCount}: ${stepData.title}`, content: stepData.content, thinkingTime });
|
67 |
+
messages.push({ role: "assistant", content: JSON.stringify(stepData) });
|
68 |
+
socket.emit('thoughtStep', steps[steps.length - 1]); // Emit individual steps
|
69 |
+
|
70 |
+
if (stepData.next_action === 'final_answer' || stepCount > 25) break;
|
71 |
+
|
72 |
+
|
73 |
+
stepCount++;
|
74 |
+
}
|
75 |
+
|
76 |
+
messages.push({ role: "user", content: "Please provide the final answer based solely on your reasoning above. Do not use JSON formatting. Only provide the text response without any titles or preambles. Retain any formatting as instructed by the original prompt, such as exact formatting for free response or multiple choice." });
|
77 |
+
const startTime = performance.now();
|
78 |
+
const finalAnswer = await makeApiCall(messages, 1200, true);
|
79 |
+
const endTime = performance.now();
|
80 |
+
totalThinkingTime += (endTime - startTime) / 1000;
|
81 |
+
|
82 |
+
|
83 |
+
socket.emit('finalAnswer', { content: finalAnswer, thinkingTime: (endTime - startTime) / 1000, totalThinkingTime });
|
84 |
+
}
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
io.on('connection', (socket) => {
|
89 |
+
console.log('A user connected');
|
90 |
+
|
91 |
+
socket.on('startChainOfThought', (inputQuestion) => {
|
92 |
+
generateResponse(inputQuestion, socket);
|
93 |
+
});
|
94 |
+
|
95 |
+
socket.on('disconnect', () => {
|
96 |
+
console.log('User disconnected');
|
97 |
+
});
|
98 |
+
});
|
99 |
+
|
100 |
+
|
101 |
+
const PORT = process.env.PORT || 3001;
|
102 |
+
server.listen(PORT, () => {
|
103 |
+
console.log(`Server running on port ${PORT}`);
|
104 |
+
});
|
serverG1.js
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const http = require('http');
|
3 |
+
const { Server } = require('socket.io');
|
4 |
+
const { default: Groq } = require('groq-sdk');
|
5 |
+
require('dotenv').config()
|
6 |
+
|
7 |
+
|
8 |
+
const app = express();
|
9 |
+
const server = http.createServer(app);
|
10 |
+
const io = new Server(server, {
|
11 |
+
cors: {
|
12 |
+
origin: '*',
|
13 |
+
methods: ['GET', 'POST'],
|
14 |
+
},
|
15 |
+
});
|
16 |
+
|
17 |
+
const groq = new Groq({ apiKey: process.env.GROK_KI_API_KEY }); // Replace with your actual API key
|
18 |
+
|
19 |
+
async function makeAPICall(messages, max_tokens, is_final_answer = false) {
|
20 |
+
for (let attempt = 0; attempt < 3; attempt++) {
|
21 |
+
try {
|
22 |
+
const response = await groq.chat.completions.create({
|
23 |
+
model: "llama-3.1-70b-versatile", // or llama-3.2-90b-text-preview
|
24 |
+
messages: messages,
|
25 |
+
max_tokens: max_tokens,
|
26 |
+
// temperature: 0.2,
|
27 |
+
temperature: 0.2,
|
28 |
+
// ...(is_final_answer ? {} : { response_format: { type: "json_object" } }),
|
29 |
+
response_format: { type: "json_object" },
|
30 |
+
});
|
31 |
+
|
32 |
+
if (is_final_answer) {
|
33 |
+
return response.choices[0].message.content;
|
34 |
+
} else {
|
35 |
+
return JSON.parse(response.choices[0].message.content);
|
36 |
+
}
|
37 |
+
} catch (e) {
|
38 |
+
if (attempt === 2) {
|
39 |
+
const errorContent = `Failed to generate ${is_final_answer ? 'final answer' : 'step'} after 3 attempts. Error: ${e}`;
|
40 |
+
return is_final_answer ? errorContent : { title: "Error", content: errorContent, next_action: "final_answer" };
|
41 |
+
|
42 |
+
}
|
43 |
+
await new Promise(resolve => setTimeout(resolve, 1000)); // Wait 1 second
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
|
50 |
+
async function generateResponse(prompt, socket) {
|
51 |
+
const messages = [
|
52 |
+
{
|
53 |
+
role: "system",
|
54 |
+
content: `You are an expert AI assistant that explains your reasoning step by step. For each step, provide a title that describes what you're doing in that step, along with the content. Decide if you need another step or if you're ready to give the final answer. Respond in JSON format with 'title', 'content', and 'next_action' (either 'continue' or 'final_answer') keys. USE AS MANY REASONING STEPS AS POSSIBLE. AT LEAST 3. BE AWARE OF YOUR LIMITATIONS AS AN LLM AND WHAT YOU CAN AND CANNOT DO. IN YOUR REASONING, INCLUDE EXPLORATION OF ALTERNATIVE ANSWERS. CONSIDER YOU MAY BE WRONG, AND IF YOU ARE WRONG IN YOUR REASONING, WHERE IT WOULD BE. FULLY TEST ALL OTHER POSSIBILITIES. YOU CAN BE WRONG. WHEN YOU SAY YOU ARE RE-EXAMINING, ACTUALLY RE-EXAMINE, AND USE ANOTHER APPROACH TO DO SO. DO NOT JUST SAY YOU ARE RE-EXAMINING. USE AT LEAST 3 METHODS TO DERIVE THE ANSWER. USE BEST PRACTICES.
|
55 |
+
Example of a valid JSON response:
|
56 |
+
{
|
57 |
+
"title": "Identifying Key Information",
|
58 |
+
"content": "To begin solving this problem, we need to carefully examine the given information and identify the crucial elements that will guide our solution process. This involves...",
|
59 |
+
"next_action": "continue"
|
60 |
+
}`
|
61 |
+
},
|
62 |
+
{ role: "user", content: prompt },
|
63 |
+
{ role: "assistant", content: "Thank you! I will now think step by step following my instructions, starting at the beginning after decomposing the problem." }
|
64 |
+
];
|
65 |
+
|
66 |
+
const steps = [];
|
67 |
+
let stepCount = 1;
|
68 |
+
let totalThinkingTime = 0;
|
69 |
+
|
70 |
+
while (true) {
|
71 |
+
const startTime = Date.now();
|
72 |
+
const stepData = await makeAPICall(messages, 300);
|
73 |
+
const endTime = Date.now();
|
74 |
+
const thinkingTime = (endTime - startTime) / 1000;
|
75 |
+
totalThinkingTime += thinkingTime;
|
76 |
+
|
77 |
+
steps.push([`Step ${stepCount}: ${stepData.title}`, stepData.content, thinkingTime]);
|
78 |
+
socket.emit('thoughtStep', `#### Step ${stepCount}: ${stepData.title}\n\n${stepData.content}`); // Emit step fter each step
|
79 |
+
|
80 |
+
messages.push({ role: "assistant", content: JSON.stringify(stepData) });
|
81 |
+
|
82 |
+
if (stepData.next_action === 'final_answer' || stepCount > 25) {
|
83 |
+
break;
|
84 |
+
}
|
85 |
+
stepCount++;
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
messages.push({ role: "user", content: "Please provide the final answer based solely on your reasoning above." });
|
90 |
+
const startTime = Date.now();
|
91 |
+
const finalAnswer = await makeAPICall(messages, 1200, true);
|
92 |
+
const endTime = Date.now();
|
93 |
+
const thinkingTime = (endTime - startTime) / 1000;
|
94 |
+
totalThinkingTime += thinkingTime;
|
95 |
+
|
96 |
+
|
97 |
+
steps.push(["Final Answer", finalAnswer, thinkingTime]);
|
98 |
+
|
99 |
+
console.log(finalAnswer);
|
100 |
+
|
101 |
+
const finalResponseMarkdown = `\n${finalAnswer.content}\n\nTotal thinking time: ${totalThinkingTime.toFixed(2)} seconds`;
|
102 |
+
socket.emit('finalAnswer', finalResponseMarkdown);
|
103 |
+
}
|
104 |
+
|
105 |
+
|
106 |
+
|
107 |
+
io.on('connection', (socket) => {
|
108 |
+
console.log('A user connected');
|
109 |
+
|
110 |
+
socket.on('startChainOfThought', (inputQuestion) => {
|
111 |
+
generateResponse(inputQuestion, socket);
|
112 |
+
});
|
113 |
+
|
114 |
+
|
115 |
+
socket.on('disconnect', () => {
|
116 |
+
console.log('User disconnected');
|
117 |
+
});
|
118 |
+
});
|
119 |
+
|
120 |
+
|
121 |
+
|
122 |
+
const PORT = process.env.PORT || 3001;
|
123 |
+
server.listen(PORT, () => {
|
124 |
+
console.log(`Server running on port ${PORT}`);
|
125 |
+
});
|
serverG1Next.js
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const http = require('http');
|
3 |
+
const { Server } = require('socket.io');
|
4 |
+
const { default: Groq } = require('groq-sdk');
|
5 |
+
require('dotenv').config()
|
6 |
+
|
7 |
+
|
8 |
+
const app = express();
|
9 |
+
const server = http.createServer(app);
|
10 |
+
const io = new Server(server, {
|
11 |
+
cors: {
|
12 |
+
origin: '*',
|
13 |
+
methods: ['GET', 'POST'],
|
14 |
+
},
|
15 |
+
});
|
16 |
+
|
17 |
+
const groq = new Groq({ apiKey: process.env.GROK_KI_API_KEY }); // Replace with your actual API key
|
18 |
+
|
19 |
+
async function makeAPICall(messages, max_tokens, is_final_answer = false) {
|
20 |
+
for (let attempt = 0; attempt < 3; attempt++) {
|
21 |
+
try {
|
22 |
+
const response = await groq.chat.completions.create({
|
23 |
+
model: "llama-3.1-70b-versatile", // or llama-3.2-90b-text-preview
|
24 |
+
messages: messages,
|
25 |
+
max_tokens: max_tokens,
|
26 |
+
temperature: 0.2,
|
27 |
+
...(is_final_answer ? {} : { response_format: { type: "json_object" } }),
|
28 |
+
});
|
29 |
+
|
30 |
+
if (is_final_answer) {
|
31 |
+
return response.choices[0].message.content;
|
32 |
+
} else {
|
33 |
+
return JSON.parse(response.choices[0].message.content);
|
34 |
+
}
|
35 |
+
} catch (e) {
|
36 |
+
if (attempt === 2) {
|
37 |
+
const errorContent = `Failed to generate ${is_final_answer ? 'final answer' : 'step'} after 3 attempts. Error: ${e}`;
|
38 |
+
return is_final_answer ? errorContent : { title: "Error", content: errorContent, next_action: "final_answer" };
|
39 |
+
|
40 |
+
}
|
41 |
+
await new Promise(resolve => setTimeout(resolve, 1000)); // Wait 1 second
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
async function generateResponse(prompt, socket) {
|
49 |
+
const messages = [
|
50 |
+
{
|
51 |
+
role: "system",
|
52 |
+
content: `You are an expert AI assistant that explains your reasoning step by step. For each step, provide a title that describes what you're doing in that step, along with the content. Decide if you need another step or if you're ready to give the final answer. Respond in JSON format with 'title', 'content', and 'next_action' (either 'continue' or 'final_answer') keys. USE AS MANY REASONING STEPS AS POSSIBLE. AT LEAST 3. BE AWARE OF YOUR LIMITATIONS AS AN LLM AND WHAT YOU CAN AND CANNOT DO. IN YOUR REASONING, INCLUDE EXPLORATION OF ALTERNATIVE ANSWERS. CONSIDER YOU MAY BE WRONG, AND IF YOU ARE WRONG IN YOUR REASONING, WHERE IT WOULD BE. FULLY TEST ALL OTHER POSSIBILITIES. YOU CAN BE WRONG. WHEN YOU SAY YOU ARE RE-EXAMINING, ACTUALLY RE-EXAMINE, AND USE ANOTHER APPROACH TO DO SO. DO NOT JUST SAY YOU ARE RE-EXAMINING. USE AT LEAST 3 METHODS TO DERIVE THE ANSWER. USE BEST PRACTICES.
|
53 |
+
Example of a valid JSON response:
|
54 |
+
{
|
55 |
+
"title": "Identifying Key Information",
|
56 |
+
"content": "To begin solving this problem, we need to carefully examine the given information and identify the crucial elements that will guide our solution process. This involves...",
|
57 |
+
"next_action": "continue"
|
58 |
+
}`
|
59 |
+
},
|
60 |
+
{ role: "user", content: prompt },
|
61 |
+
{ role: "assistant", content: "Thank you! I will now think step by step following my instructions, starting at the beginning after decomposing the problem." }
|
62 |
+
];
|
63 |
+
|
64 |
+
const steps = [];
|
65 |
+
let stepCount = 1;
|
66 |
+
let totalThinkingTime = 0;
|
67 |
+
|
68 |
+
while (true) {
|
69 |
+
const startTime = Date.now();
|
70 |
+
const stepData = await makeAPICall(messages, 300);
|
71 |
+
const endTime = Date.now();
|
72 |
+
const thinkingTime = (endTime - startTime) / 1000;
|
73 |
+
totalThinkingTime += thinkingTime;
|
74 |
+
|
75 |
+
steps.push([`Step ${stepCount}: ${stepData.title}`, stepData.content, thinkingTime]);
|
76 |
+
socket.emit('thoughtStep', `### Step ${stepCount}: ${stepData.title}\n\n${stepData.content}`); // Emit step fter each step
|
77 |
+
|
78 |
+
messages.push({ role: "assistant", content: JSON.stringify(stepData) });
|
79 |
+
|
80 |
+
if (stepData.next_action === 'final_answer' || stepCount > 25) {
|
81 |
+
break;
|
82 |
+
}
|
83 |
+
stepCount++;
|
84 |
+
}
|
85 |
+
|
86 |
+
|
87 |
+
messages.push({ role: "user", content: "Please provide the final answer based solely on your reasoning above." });
|
88 |
+
const startTime = Date.now();
|
89 |
+
const finalAnswer = await makeAPICall(messages, 1200, true);
|
90 |
+
const endTime = Date.now();
|
91 |
+
const thinkingTime = (endTime - startTime) / 1000;
|
92 |
+
totalThinkingTime += thinkingTime;
|
93 |
+
|
94 |
+
|
95 |
+
steps.push(["Final Answer", finalAnswer, thinkingTime]);
|
96 |
+
socket.emit('finalAnswer', finalAnswer);
|
97 |
+
}
|
98 |
+
|
99 |
+
|
100 |
+
|
101 |
+
io.on('connection', (socket) => {
|
102 |
+
console.log('A user connected');
|
103 |
+
|
104 |
+
socket.on('startChainOfThought', (inputQuestion) => {
|
105 |
+
generateResponse(inputQuestion, socket);
|
106 |
+
});
|
107 |
+
|
108 |
+
|
109 |
+
socket.on('disconnect', () => {
|
110 |
+
console.log('User disconnected');
|
111 |
+
});
|
112 |
+
});
|
113 |
+
|
114 |
+
|
115 |
+
|
116 |
+
const PORT = process.env.PORT || 3001;
|
117 |
+
server.listen(PORT, () => {
|
118 |
+
console.log(`Server running on port ${PORT}`);
|
119 |
+
});
|
serverGiSuper.js
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const http = require('http');
|
3 |
+
const { Server } = require('socket.io');
|
4 |
+
const { default: Groq } = require('groq-sdk');
|
5 |
+
require('dotenv').config()
|
6 |
+
|
7 |
+
const app = express();
|
8 |
+
const server = http.createServer(app);
|
9 |
+
const io = new Server(server, {
|
10 |
+
cors: {
|
11 |
+
origin: '*',
|
12 |
+
methods: ['GET', 'POST'],
|
13 |
+
},
|
14 |
+
});
|
15 |
+
|
16 |
+
const groq = new Groq({ apiKey: process.env.GROK_KI_API_KEY });
|
17 |
+
|
18 |
+
|
19 |
+
async function makeApiCall(messages, max_tokens, is_final_answer = false) {
|
20 |
+
for (let attempt = 0; attempt < 3; attempt++) {
|
21 |
+
try {
|
22 |
+
const response = await groq.chat.completions.create({
|
23 |
+
model: "llama-3.1-70b-versatile", // Update if needed
|
24 |
+
messages: messages,
|
25 |
+
max_tokens: max_tokens,
|
26 |
+
temperature: 1,
|
27 |
+
response_format: is_final_answer ? undefined : { type: "json_object" },
|
28 |
+
});
|
29 |
+
|
30 |
+
if (is_final_answer) {
|
31 |
+
return response.choices[0].message.content;
|
32 |
+
} else {
|
33 |
+
return JSON.parse(response.choices[0].message.content);
|
34 |
+
}
|
35 |
+
} catch (e) {
|
36 |
+
if (attempt === 2) {
|
37 |
+
if (is_final_answer) {
|
38 |
+
return { title: "Error", content: `Failed to generate final answer after 3 attempts. Error: ${e}` };
|
39 |
+
} else {
|
40 |
+
return { title: "Error", content: `Failed to generate step after 3 attempts. Error: ${e}`, next_action: "final_answer" };
|
41 |
+
}
|
42 |
+
}
|
43 |
+
console.error("API call failed, retrying...", e);
|
44 |
+
await new Promise(resolve => setTimeout(resolve, 1000)); // Wait 1 second
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
|
50 |
+
async function chainOfThought(prompt, socket) {
|
51 |
+
const systemMessage = {
|
52 |
+
role: "system",
|
53 |
+
content: `You are an expert AI assistant that explains your reasoning step by step. For each step, provide a title that describes what you're doing in that step, along with the content. Decide if you need another step or if you're ready to give the final answer. Respond in JSON format with 'title', 'content', and 'next_action' (either 'continue' or 'final_answer') keys. USE AS MANY REASONING STEPS AS POSSIBLE. AT LEAST 3. BE AWARE OF YOUR LIMITATIONS AS AN LLM AND WHAT YOU CAN AND CANNOT DO. IN YOUR REASONING, INCLUDE EXPLORATION OF ALTERNATIVE ANSWERS. CONSIDER YOU MAY BE WRONG, AND IF YOU ARE WRONG IN YOUR REASONING, WHERE IT WOULD BE. FULLY TEST ALL OTHER POSSIBILITIES. YOU CAN BE WRONG. WHEN YOU SAY YOU ARE RE-EXAMINING, ACTUALLY RE-EXAMINE, AND USE ANOTHER APPROACH TO DO SO. DO NOT JUST SAY YOU ARE RE-EXAMINING. USE AT LEAST 3 METHODS TO DERIVE THE ANSWER. USE BEST PRACTICES.
|
54 |
+
|
55 |
+
Example of a valid JSON response:
|
56 |
+
\`\`\`json
|
57 |
+
{
|
58 |
+
"title": "Identifying Key Information",
|
59 |
+
"content": "To begin solving this problem, we need to carefully examine the given information and identify the crucial elements that will guide our solution process. This involves...",
|
60 |
+
"next_action": "continue"
|
61 |
+
}
|
62 |
+
\`\`\`
|
63 |
+
`
|
64 |
+
};
|
65 |
+
|
66 |
+
let messages = [
|
67 |
+
systemMessage,
|
68 |
+
{ role: "user", content: prompt },
|
69 |
+
{ role: "assistant", content: "Thank you! I will now think step by step following my instructions, starting at the beginning after decomposing the problem." }
|
70 |
+
];
|
71 |
+
|
72 |
+
let steps = [];
|
73 |
+
let totalThinkingTime = 0;
|
74 |
+
|
75 |
+
|
76 |
+
for (let stepCount = 1; stepCount <= 25; stepCount++) {
|
77 |
+
const startTime = performance.now();
|
78 |
+
let stepData = await makeApiCall(messages, 300);
|
79 |
+
const endTime = performance.now();
|
80 |
+
const thinkingTime = (endTime - startTime) / 1000;
|
81 |
+
totalThinkingTime += thinkingTime;
|
82 |
+
|
83 |
+
const currentStepMarkdown = `### Step ${stepCount}: ${stepData.title}\n\n${stepData.content}\n\n*Thinking Time: ${thinkingTime} seconds*`;
|
84 |
+
|
85 |
+
steps.push([`Step ${stepCount}: ${stepData.title}`, stepData.content, thinkingTime]);
|
86 |
+
messages.push({ role: "assistant", content: JSON.stringify(stepData) });
|
87 |
+
|
88 |
+
socket.emit('thoughtStep', currentStepMarkdown);
|
89 |
+
|
90 |
+
if (stepData.next_action === 'final_answer') {
|
91 |
+
break;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
messages.push({ role: "user", content: "Please provide the final answer based solely on your reasoning above. Do not use JSON formatting. Only provide the text response without any titles or preambles. Retain any formatting as instructed by the original prompt, such as exact formatting for free response or multiple choice." });
|
96 |
+
const startTimeFinal = performance.now();
|
97 |
+
const finalAnswer = await makeApiCall(messages, 1200, true);
|
98 |
+
const endTimeFinal = performance.now();
|
99 |
+
totalThinkingTime += (endTimeFinal - startTimeFinal) / 1000;
|
100 |
+
|
101 |
+
const finalAnswerMarkdown = `\n${finalAnswer}\n\n*Thinking Time: ${(endTimeFinal - startTimeFinal) / 1000} seconds*`;
|
102 |
+
steps.push(["Final Answer", finalAnswer, (endTimeFinal - startTimeFinal) / 1000]);
|
103 |
+
socket.emit('finalAnswer', finalAnswerMarkdown);
|
104 |
+
console.log(`Total thinking time: ${totalThinkingTime.toFixed(2)} seconds`);
|
105 |
+
|
106 |
+
}
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
io.on('connection', (socket) => {
|
111 |
+
console.log('A user connected');
|
112 |
+
|
113 |
+
socket.on('startChainOfThought', (inputQuestion) => {
|
114 |
+
chainOfThought(inputQuestion, socket);
|
115 |
+
});
|
116 |
+
|
117 |
+
socket.on('disconnect', () => {
|
118 |
+
console.log('User disconnected');
|
119 |
+
});
|
120 |
+
});
|
121 |
+
|
122 |
+
const PORT = process.env.PORT || 3001;
|
123 |
+
server.listen(PORT, () => {
|
124 |
+
console.log(`Server running on port ${PORT}`);
|
125 |
+
});
|
server_final1.js
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const http = require('http');
|
3 |
+
const { Server } = require('socket.io');
|
4 |
+
const { default: Groq } = require('groq-sdk');
|
5 |
+
require('dotenv').config()
|
6 |
+
|
7 |
+
const app = express();
|
8 |
+
const server = http.createServer(app);
|
9 |
+
const io = new Server(server, {
|
10 |
+
cors: {
|
11 |
+
origin: '*',
|
12 |
+
methods: ['GET', 'POST'],
|
13 |
+
},
|
14 |
+
});
|
15 |
+
|
16 |
+
const groq = new Groq({ apiKey: process.env.GROK_KI_API_KEY }); // Replace with your actual API key
|
17 |
+
|
18 |
+
async function getGroqChatCompletion(messages) {
|
19 |
+
const data = await groq.chat.completions.create({
|
20 |
+
messages: messages,
|
21 |
+
model: "llama-3.2-90b-text-preview" ,
|
22 |
+
temperature: 0.7,
|
23 |
+
max_tokens: 7000,
|
24 |
+
});
|
25 |
+
return data.choices[0]?.message?.content || "";
|
26 |
+
}
|
27 |
+
|
28 |
+
async function chainOfThought(inputQuery, socket) {
|
29 |
+
console.log(`\nInput Question: ${inputQuery}\n`);
|
30 |
+
|
31 |
+
var steps = [
|
32 |
+
{
|
33 |
+
role: "system",
|
34 |
+
// content: "You are an AI assistant designed to break down complex questions and provide step-by-step analysis. Each of your responses should build upon the previous steps."
|
35 |
+
// content: "You are an AI assistant designed to break down complex questions and provide step-by-step analysis. Each of your responses should build upon the previous steps.talk like you are passing the steps to the next LLM and ai to improve upon current answer like a human is prompting the LLM in first person"
|
36 |
+
content: "You are an AI assistant designed to break down complex questions and provide step-by-step analysis. Each of your responses should build upon the previous steps.talk to improve upon current answer talk like a human dont excpect somebody is giving you something after first prompt assume the best answer yourself"
|
37 |
+
|
38 |
+
},
|
39 |
+
{
|
40 |
+
role: "user",
|
41 |
+
content: `Break down the following question into key components and identify the main goal: "${inputQuery}"`
|
42 |
+
},
|
43 |
+
{
|
44 |
+
role: "user",
|
45 |
+
content: "Based on the key components identified, what relevant background information,edge cases etc or context is necessary to address this question?"
|
46 |
+
},
|
47 |
+
{
|
48 |
+
role: "user",
|
49 |
+
content: "Considering the background information, what are the main aspects or sub-problems that need to be addressed to answer the original question?"
|
50 |
+
},
|
51 |
+
{
|
52 |
+
role: "user",
|
53 |
+
content: "For each aspect or sub-problem identified, what are potential approaches or solutions?"
|
54 |
+
},
|
55 |
+
{
|
56 |
+
role: "user",
|
57 |
+
content: "Evaluate the pros and cons of each approach or solution. Which seem most promising and why?"
|
58 |
+
},
|
59 |
+
// {
|
60 |
+
// role: "user",
|
61 |
+
// content: "Synthesize the analysis from previous steps to formulate a comprehensive answer to the original question. Make sure to address all key components identified in the all steps and give the final answer to this question."
|
62 |
+
// },
|
63 |
+
{
|
64 |
+
role: "user",
|
65 |
+
content: "Synthesize the analysis from previous steps to formulate a comprehensive answer to the original question implement the final approach fully and dont leave anything if code give complete code of each and every file. Make sure to address all key components identified in the all steps and give the final answer to this question."
|
66 |
+
},
|
67 |
+
// {
|
68 |
+
// role: "user",
|
69 |
+
// content: "write the complete final answer dont hesitate"
|
70 |
+
// }
|
71 |
+
];
|
72 |
+
|
73 |
+
|
74 |
+
|
75 |
+
let messages = steps.slice(0, 2); // Include system message and first user message
|
76 |
+
|
77 |
+
for (let i = 1; i < steps.length; i++) {
|
78 |
+
const response = await getGroqChatCompletion(messages);
|
79 |
+
socket.emit('thoughtStep', response);
|
80 |
+
|
81 |
+
messages.push({ role: "assistant", content: response });
|
82 |
+
if (i < steps.length - 1) {
|
83 |
+
messages.push(steps[i + 1]);
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
const finalAnswer = messages[messages.length - 1].content;
|
88 |
+
socket.emit('finalAnswer', finalAnswer);
|
89 |
+
}
|
90 |
+
|
91 |
+
io.on('connection', (socket) => {
|
92 |
+
console.log('A user connected');
|
93 |
+
|
94 |
+
socket.on('startChainOfThought', (inputQuestion) => {
|
95 |
+
chainOfThought(inputQuestion, socket);
|
96 |
+
});
|
97 |
+
|
98 |
+
socket.on('disconnect', () => {
|
99 |
+
console.log('User disconnected');
|
100 |
+
});
|
101 |
+
});
|
102 |
+
|
103 |
+
const PORT = process.env.PORT || 3001;
|
104 |
+
server.listen(PORT, () => {
|
105 |
+
console.log(`Server running on port ${PORT}`);
|
106 |
+
});
|