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
07cc7f15
"vscode:/vscode.git/clone" did not exist on "44e41db9f5785c2c3860db5b2c6082fd215ea24e"
Unverified
Commit
07cc7f15
authored
Jan 03, 2024
by
ThatOneCalculator
Browse files
chore:
🚨
lint and format
parent
03779316
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
docker-compose.data.yaml
docker-compose.data.yaml
+1
-1
docker-compose.yaml
docker-compose.yaml
+1
-1
src/lib/apis/openai/index.ts
src/lib/apis/openai/index.ts
+1
-1
src/lib/utils/index.ts
src/lib/utils/index.ts
+2
-2
No files found.
docker-compose.data.yaml
View file @
07cc7f15
docker-compose.yaml
View file @
07cc7f15
...
...
@@ -25,7 +25,7 @@ services:
ports
:
-
${OLLAMA_WEBUI_PORT-3000}:8080
environment
:
-
"
OLLAMA_API_BASE_URL=http://ollama:11434/api
"
-
'
OLLAMA_API_BASE_URL=http://ollama:11434/api
'
extra_hosts
:
-
host.docker.internal:host-gateway
restart
:
unless-stopped
...
...
src/lib/apis/openai/index.ts
View file @
07cc7f15
...
...
@@ -25,7 +25,7 @@ export const getOpenAIModels = async (
throw
error
;
}
le
t
models
=
Array
.
isArray
(
res
)
?
res
:
res
?.
data
??
null
;
cons
t
models
=
Array
.
isArray
(
res
)
?
res
:
res
?.
data
??
null
;
return
models
.
map
((
model
)
=>
({
name
:
model
.
id
,
external
:
true
}))
...
...
src/lib/utils/index.ts
View file @
07cc7f15
...
...
@@ -21,7 +21,7 @@ export const splitStream = (splitOn) => {
};
export
const
convertMessagesToHistory
=
(
messages
)
=>
{
le
t
history
=
{
cons
t
history
=
{
messages
:
{},
currentId
:
null
};
...
...
@@ -114,7 +114,7 @@ export const checkVersion = (required, current) => {
export
const
findWordIndices
=
(
text
)
=>
{
const
regex
=
/
\[([^\]]
+
)\]
/g
;
le
t
matches
=
[];
cons
t
matches
=
[];
let
match
;
while
((
match
=
regex
.
exec
(
text
))
!==
null
)
{
...
...
Prev
1
2
Next
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