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
81b7cdfe
"...git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "bc82ffe2b468d1966d5088ef40256cf58cfdf41b"
Commit
81b7cdfe
authored
Apr 21, 2024
by
Jun Siang Cheah
Browse files
fix: add typescript types for models
parent
948f2e91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
2 deletions
+33
-2
src/lib/stores/index.ts
src/lib/stores/index.ts
+33
-2
No files found.
src/lib/stores/index.ts
View file @
81b7cdfe
import
{
APP_NAME
}
from
'
$lib/constants
'
;
import
{
APP_NAME
}
from
'
$lib/constants
'
;
import
{
writable
}
from
'
svelte/store
'
;
import
{
type
Writable
,
writable
}
from
'
svelte/store
'
;
// Backend
// Backend
export
const
WEBUI_NAME
=
writable
(
APP_NAME
);
export
const
WEBUI_NAME
=
writable
(
APP_NAME
);
...
@@ -14,7 +14,7 @@ export const chatId = writable('');
...
@@ -14,7 +14,7 @@ export const chatId = writable('');
export
const
chats
=
writable
([]);
export
const
chats
=
writable
([]);
export
const
tags
=
writable
([]);
export
const
tags
=
writable
([]);
export
const
models
=
writable
([]);
export
const
models
:
Writable
<
Model
[]
>
=
writable
([]);
export
const
modelfiles
=
writable
([]);
export
const
modelfiles
=
writable
([]);
export
const
prompts
=
writable
([]);
export
const
prompts
=
writable
([]);
...
@@ -36,3 +36,34 @@ export const documents = writable([
...
@@ -36,3 +36,34 @@ export const documents = writable([
export
const
settings
=
writable
({});
export
const
settings
=
writable
({});
export
const
showSettings
=
writable
(
false
);
export
const
showSettings
=
writable
(
false
);
export
const
showChangelog
=
writable
(
false
);
export
const
showChangelog
=
writable
(
false
);
type
Model
=
OpenAIModel
|
OllamaModel
;
type
OpenAIModel
=
{
id
:
string
;
name
:
string
;
external
:
boolean
;
source
?:
string
;
}
type
OllamaModel
=
{
id
:
string
;
name
:
string
;
// Ollama specific fields
details
:
OllamaModelDetails
;
size
:
number
;
description
:
string
;
model
:
string
;
modified_at
:
string
;
digest
:
string
;
}
type
OllamaModelDetails
=
{
parent_model
:
string
;
format
:
string
;
family
:
string
;
families
:
string
[]
|
null
;
parameter_size
:
string
;
quantization_level
:
string
;
};
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