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
1196fa88
"...targets/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "8c73c72e74b1b0945a094d59c727b9195c4e9b13"
Commit
1196fa88
authored
Nov 22, 2023
by
Timothy J. Baek
Browse files
fix: openai model support
parent
044ee2a7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
src/routes/(app)/+page.svelte
src/routes/(app)/+page.svelte
+4
-3
src/routes/(app)/c/[id]/+page.svelte
src/routes/(app)/c/[id]/+page.svelte
+3
-3
No files found.
src/routes/(app)/+page.svelte
View file @
1196fa88
...
...
@@ -85,6 +85,7 @@
};
const sendPromptOllama = async (model, userPrompt, parentId) => {
console.log('sendPromptOllama');
let responseMessageId = uuidv4();
let responseMessage = {
...
...
@@ -214,7 +215,7 @@
};
const sendPromptOpenAI = async (model, userPrompt, parentId) => {
if (settings.OPENAI_API_KEY) {
if (
$
settings.OPENAI_API_KEY) {
if (models) {
let responseMessageId = uuidv4();
...
...
@@ -242,7 +243,7 @@
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${settings.OPENAI_API_KEY}`
Authorization: `Bearer ${
$
settings.OPENAI_API_KEY}`
},
body: JSON.stringify({
model: model,
...
...
@@ -251,7 +252,7 @@
$settings.system
? {
role: 'system',
content: settings.system
content:
$
settings.system
}
: undefined,
...messages
...
...
src/routes/(app)/c/[id]/+page.svelte
View file @
1196fa88
...
...
@@ -251,7 +251,7 @@
};
const sendPromptOpenAI = async (model, userPrompt, parentId) => {
if (settings.OPENAI_API_KEY) {
if (
$
settings.OPENAI_API_KEY) {
if (models) {
let responseMessageId = uuidv4();
...
...
@@ -279,7 +279,7 @@
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${settings.OPENAI_API_KEY}`
Authorization: `Bearer ${
$
settings.OPENAI_API_KEY}`
},
body: JSON.stringify({
model: model,
...
...
@@ -288,7 +288,7 @@
$settings.system
? {
role: 'system',
content: settings.system
content:
$
settings.system
}
: undefined,
...messages
...
...
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