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
9aa689ea
Commit
9aa689ea
authored
May 06, 2024
by
Timothy J. Baek
Browse files
feat: title trim quotation marks
parent
7f617225
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/lib/apis/ollama/index.ts
src/lib/apis/ollama/index.ts
+1
-1
src/lib/apis/openai/index.ts
src/lib/apis/openai/index.ts
+1
-1
No files found.
src/lib/apis/ollama/index.ts
View file @
9aa689ea
...
@@ -182,7 +182,7 @@ export const generateTitle = async (
...
@@ -182,7 +182,7 @@ export const generateTitle = async (
throw
error
;
throw
error
;
}
}
return
res
?.
response
??
'
New Chat
'
;
return
res
?.
response
.
replace
(
/
[
"'
]
/g
,
''
)
??
'
New Chat
'
;
};
};
export
const
generatePrompt
=
async
(
token
:
string
=
''
,
model
:
string
,
conversation
:
string
)
=>
{
export
const
generatePrompt
=
async
(
token
:
string
=
''
,
model
:
string
,
conversation
:
string
)
=>
{
...
...
src/lib/apis/openai/index.ts
View file @
9aa689ea
...
@@ -316,5 +316,5 @@ export const generateTitle = async (
...
@@ -316,5 +316,5 @@ export const generateTitle = async (
throw
error
;
throw
error
;
}
}
return
res
?.
choices
[
0
]?.
message
?.
content
??
'
New Chat
'
;
return
res
?.
choices
[
0
]?.
message
?.
content
.
replace
(
/
[
"'
]
/g
,
''
)
??
'
New Chat
'
;
};
};
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