Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
96c0b8a6
Commit
96c0b8a6
authored
May 24, 2024
by
Timothy J. Baek
Browse files
feat: clone support
parent
0715cd28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
src/routes/(app)/workspace/models/create/+page.svelte
src/routes/(app)/workspace/models/create/+page.svelte
+24
-7
No files found.
src/routes/(app)/workspace/models/create/+page.svelte
View file @
96c0b8a6
...
...
@@ -29,6 +29,11 @@
let id = '';
let name = '';
let params = {};
let capabilities = {
vision: true
};
let info = {
id: '',
base_model_id: null,
...
...
@@ -47,12 +52,6 @@
}
};
let params = {};
let capabilities = {
vision: false
};
$: if (name) {
id = name.replace(/\s+/g, '-').toLowerCase();
}
...
...
@@ -96,6 +95,19 @@
success = false;
};
const initModel = (model) => {
id = model.id;
name = model.name;
params = { ...params, ...model?.info?.params };
capabilities = { ...capabilities, ...(model?.info?.meta?.capabilities ?? {}) };
info = {
...info,
...model.info
};
};
onMount(async () => {
window.addEventListener('message', async (event) => {
if (
...
...
@@ -108,8 +120,11 @@
].includes(event.origin)
)
return;
const model = JSON.parse(event.data);
console.log(model);
initModel(model);
});
if (window.opener ?? false) {
...
...
@@ -118,8 +133,10 @@
if (sessionStorage.model) {
const model = JSON.parse(sessionStorage.model);
console.log(model);
sessionStorage.removeItem('model');
console.log(model);
initModel(model);
}
});
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment