@flotorch/loadtest 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ This launches an interactive wizard that asks for:
|
|
|
41
41
|
|
|
42
42
|
- **Provider adapter** — `openai` or `sagemaker` (default: `openai`)
|
|
43
43
|
- **Model name** — the model identifier your endpoint expects
|
|
44
|
-
- **Base URL** — API endpoint (default: `https://api.openai.com/v1
|
|
44
|
+
- **Base URL** — API endpoint (default: `https://api.openai.com/v1`)
|
|
45
45
|
- **Concurrency** — number of parallel requests (default: `10`)
|
|
46
46
|
- **Input tokens mean** — average input token count per request (default: `512`)
|
|
47
47
|
- **Output tokens mean** — average output token count per request (default: `256`)
|
|
@@ -129,7 +129,7 @@ The config file is JSON with four sections:
|
|
|
129
129
|
"provider": {
|
|
130
130
|
"adapter": "openai", // "openai" | "sagemaker"
|
|
131
131
|
"model": "gpt-4o", // model identifier (required)
|
|
132
|
-
"baseURL": "https://api.openai.com/v1
|
|
132
|
+
"baseURL": "https://api.openai.com/v1", // API endpoint
|
|
133
133
|
"systemPrompt": "You are a helpful assistant.", // optional system message
|
|
134
134
|
"config": {}, // backend-specific options
|
|
135
135
|
},
|
|
@@ -199,7 +199,7 @@ The config file is JSON with four sections:
|
|
|
199
199
|
"provider": {
|
|
200
200
|
"adapter": "openai",
|
|
201
201
|
"model": "gpt-4o",
|
|
202
|
-
"baseURL": "https://api.openai.com/v1
|
|
202
|
+
"baseURL": "https://api.openai.com/v1"
|
|
203
203
|
},
|
|
204
204
|
"benchmark": {
|
|
205
205
|
"concurrency": 20,
|
|
@@ -239,7 +239,7 @@ The config file is JSON with four sections:
|
|
|
239
239
|
"provider": {
|
|
240
240
|
"adapter": "openai",
|
|
241
241
|
"model": "gpt-4o-mini",
|
|
242
|
-
"baseURL": "https://api.openai.com/v1
|
|
242
|
+
"baseURL": "https://api.openai.com/v1"
|
|
243
243
|
},
|
|
244
244
|
"benchmark": {
|
|
245
245
|
"concurrency": 10,
|
package/dist/index.js
CHANGED
|
@@ -455,7 +455,7 @@ var cyan = wrap("36", "39");
|
|
|
455
455
|
var magenta = wrap("35", "39");
|
|
456
456
|
|
|
457
457
|
// src/cli/args.ts
|
|
458
|
-
var VERSION = true ? "0.2.
|
|
458
|
+
var VERSION = true ? "0.2.2" : "dev";
|
|
459
459
|
var VALID_COMMANDS = /* @__PURE__ */ new Set(["run", "generate", "bench", "report", "init"]);
|
|
460
460
|
var HELP_TEXT = `
|
|
461
461
|
${bold("FLOTorch Load Tester")} ${dim(`v${VERSION}`)}
|
|
@@ -628,8 +628,8 @@ async function runInit(outputPath) {
|
|
|
628
628
|
}
|
|
629
629
|
let baseURL;
|
|
630
630
|
if (adapter === "openai") {
|
|
631
|
-
const url = await prompt(rl, "Base URL", "https://api.openai.com/v1
|
|
632
|
-
if (url !== "https://api.openai.com/v1
|
|
631
|
+
const url = await prompt(rl, "Base URL", "https://api.openai.com/v1");
|
|
632
|
+
if (url !== "https://api.openai.com/v1") {
|
|
633
633
|
baseURL = url;
|
|
634
634
|
}
|
|
635
635
|
}
|
|
@@ -868,11 +868,11 @@ var OpenAIBackend = class _OpenAIBackend {
|
|
|
868
868
|
apiKey;
|
|
869
869
|
static create(baseURL) {
|
|
870
870
|
const env = validateEnv(EnvSchema, "openai");
|
|
871
|
-
const url = baseURL ?? "https://api.openai.com/v1
|
|
871
|
+
const url = baseURL ?? "https://api.openai.com/v1";
|
|
872
872
|
return new _OpenAIBackend(url, env.OPENAI_API_KEY);
|
|
873
873
|
}
|
|
874
874
|
constructor(baseURL, apiKey) {
|
|
875
|
-
this.url = baseURL
|
|
875
|
+
this.url = baseURL.endsWith("/") ? baseURL : `${baseURL.replace(/\/+$/, "")}/chat/completions`;
|
|
876
876
|
this.apiKey = apiKey;
|
|
877
877
|
}
|
|
878
878
|
async request(prompt2, model, maxTokens, systemPrompt, params, streaming, signal) {
|