release v1.0.15

This commit is contained in:
musi
2025-07-07 15:03:48 +08:00
parent c5ddf2ddae
commit 3260d1b6b8
3 changed files with 13 additions and 12 deletions

View File

@@ -47,20 +47,21 @@ export const readConfigFile = async () => {
const config = await fs.readFile(CONFIG_FILE, "utf-8");
return JSON.parse(config);
} catch {
const apiKey = await question("Enter OPENAI_API_KEY: ");
const baseUrl = await question("Enter OPENAI_BASE_URL: ");
const model = await question("Enter OPENAI_MODEL: ");
const name = await question("Enter Provider Name: ");
const apiKey = await question("Enter Provider API KEY: ");
const baseUrl = await question("Enter Provider URL: ");
const model = await question("Enter MODEL Name: ");
const config = Object.assign({}, DEFAULT_CONFIG, {
Providers: [
{
name: "openai",
name,
api_base_url: baseUrl,
api_key: apiKey,
models: [model],
},
],
Router: {
default: `openai,${model}`,
default: `${name},${model}`,
},
});
await writeConfigFile(config);