init: initial commit

This commit is contained in:
Blizzard
2026-04-01 14:09:33 +08:00
commit aef2e152dc
66 changed files with 6540 additions and 0 deletions
+88
View File
@@ -0,0 +1,88 @@
export namespace handler {
export class LibraryInfo {
id: number;
name: string;
description: string;
entry_count: number;
is_active: boolean;
static createFrom(source: any = {}) {
return new LibraryInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.name = source["name"];
this.description = source["description"];
this.entry_count = source["entry_count"];
this.is_active = source["is_active"];
}
}
export class ProviderPreset {
id: string;
label: string;
base_url: string;
default_model: string;
static createFrom(source: any = {}) {
return new ProviderPreset(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.label = source["label"];
this.base_url = source["base_url"];
this.default_model = source["default_model"];
}
}
}
export namespace service {
export class ImportResult {
imported: number;
skipped: number;
error?: string;
static createFrom(source: any = {}) {
return new ImportResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.imported = source["imported"];
this.skipped = source["skipped"];
this.error = source["error"];
}
}
export class SettingsDTO {
ai_provider: string;
base_url: string;
api_key: string;
model: string;
system_prompt: string;
max_tokens: number;
use_public_key: boolean;
static createFrom(source: any = {}) {
return new SettingsDTO(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.ai_provider = source["ai_provider"];
this.base_url = source["base_url"];
this.api_key = source["api_key"];
this.model = source["model"];
this.system_prompt = source["system_prompt"];
this.max_tokens = source["max_tokens"];
this.use_public_key = source["use_public_key"];
}
}
}