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.
26 lines
605 B
JavaScript
26 lines
605 B
JavaScript
import { api } from "../../scripts/api.js";
|
|
import { app } from "../../scripts/app.js";
|
|
|
|
app.registerExtension({
|
|
name: "VeniceAI.Settings",
|
|
settings: [
|
|
{
|
|
category: ["VeniceAI", "API Key", "VeniceAI API Key"],
|
|
id: "VeniceAI.apikey",
|
|
name: "VeniceAI API Key",
|
|
type: "text",
|
|
defaultValue: "your_venice_api_key_here",
|
|
tooltip: "Enter your VeniceAI API Key/Bearer Token here",
|
|
attrs: {
|
|
type: "password",
|
|
},
|
|
onChange: async (newVal) => {
|
|
api.fetchApi("/veniceai/save_apikey", {
|
|
method: "POST",
|
|
body: JSON.stringify({ apikey: newVal }),
|
|
});
|
|
}
|
|
},
|
|
],
|
|
});
|