This commit is contained in:
khanon
2023-12-13 21:56:07 +00:00
parent 0d3682197c
commit fad16cc268
40 changed files with 588 additions and 357 deletions
+4 -3
View File
@@ -1,6 +1,6 @@
const axios = require("axios");
const concurrentRequests = 5;
const concurrentRequests = 75;
const headers = {
Authorization: "Bearer test",
"Content-Type": "application/json",
@@ -16,7 +16,7 @@ const payload = {
const makeRequest = async (i) => {
try {
const response = await axios.post(
"http://localhost:7860/proxy/azure/openai/v1/chat/completions",
"http://localhost:7860/proxy/google-ai/v1/chat/completions",
payload,
{ headers }
);
@@ -25,7 +25,8 @@ const makeRequest = async (i) => {
response.data
);
} catch (error) {
console.error(`Error in req ${i}:`, error.message);
const msg = error.response
console.error(`Error in req ${i}:`, error.message, msg || "");
}
};