allow custom api url, key, model

This commit is contained in:
josc146
2023-06-20 23:24:51 +08:00
parent 285e8b1577
commit bae9ae6551
5 changed files with 130 additions and 10 deletions

View File

@@ -56,6 +56,7 @@ class CommonStore {
// downloads
downloadList: DownloadStatus[] = [];
// settings
advancedCollapsed: boolean = true;
settings: SettingsType = {
language: getUserLanguage(),
darkMode: !isSystemLightMode(),
@@ -65,7 +66,11 @@ class CommonStore {
host: '127.0.0.1',
dpiScaling: 100,
customModelsPath: './models',
customPythonPath: ''
customPythonPath: '',
apiUrl: '',
apiKey: 'sk-',
apiChatModelName: 'rwkv',
apiCompletionModelName: 'rwkv'
};
// about
about: AboutContent = manifest.about;
@@ -188,6 +193,10 @@ class CommonStore {
setCurrentInput(value: string) {
this.currentInput = value;
}
setAdvancedCollapsed(value: boolean) {
this.advancedCollapsed = value;
}
}
export default new CommonStore();