my shitty description: refactor a bunch of stuff better model loading, removed the stupid js workaround to populating the COMBO fields removed model loading from js and model fetching from routes/pyserver unified model/character/styles lists internally as "catalog" changed textbox in settings to by type: password replaced primitive requests with client session for better/cleaner/modular request managing, added some better error logging and responses added dry run env var VENICE_CLIENT_DRY_RUN can be set to 'true' or '1' (it just returns dummy response and doesnt hit the veniceai api) make __init__.py module/node loading better by loading any .py file with NODE_*_MAPPING in nodes folder instead of hardcoding names remove old redundant files AI summarized description with some editing: - Added `venice_client.py` for handling API requests to VeniceAI. - Introduced `venice_config.py` for managing API key configuration. - Created `venice_catalog.py` to manage and cache models, styles, and characters. - Removed outdated key management logic from `pyserver/get_key_from_jssetting.py`. - Consolidated character and model update logic into the new catalog management system. - Move utility functions to `nodes/utils.py` containing validation stuff mostly. - Removed legacy update scripts for characters, models, and styles. - Added error handling and logging for API interactions. - remove obsolete workflow JSON file.
17 lines
626 B
JavaScript
17 lines
626 B
JavaScript
import { api } from "../../scripts/api.js";
|
|
import { app } from "../../scripts/app.js";
|
|
|
|
app.registerExtension({
|
|
name: "VeniceAI.Startup",
|
|
|
|
async setup() {
|
|
try {
|
|
console.log("(VeniceAI.Startup) Fetching VeniceAI API key from config file...");
|
|
const api_key_response = await api.fetchApi("/veniceai/get_apikey");
|
|
const savedKey = await api_key_response.json();
|
|
app.extensionManager.setting.set("VeniceAI.apikey", savedKey.apikey);
|
|
} catch (error) {
|
|
console.error("(VeniceAI.Startup) Failed to load Venice API key", error);
|
|
}
|
|
},
|
|
}); |