mirror of
https://github.com/open-webui/open-webui
synced 2025-06-25 09:47:41 +00:00
Merge branch 'dev' into feat/onedrive-file-attach
This commit is contained in:
commit
23ff2988bf
@ -84,9 +84,9 @@ def openai_o1_o3_handler(payload):
|
|||||||
payload["max_completion_tokens"] = payload["max_tokens"]
|
payload["max_completion_tokens"] = payload["max_tokens"]
|
||||||
del payload["max_tokens"]
|
del payload["max_tokens"]
|
||||||
|
|
||||||
# Fix: O1 does not support the "system" parameter, Modify "system" to "user"
|
# Fix: o1 and o3 do not support the "system" parameter. Modify "system" to "developer"
|
||||||
if payload["messages"][0]["role"] == "system":
|
if payload["messages"][0]["role"] == "system":
|
||||||
payload["messages"][0]["role"] = "user"
|
payload["messages"][0]["role"] = "developer"
|
||||||
|
|
||||||
return payload
|
return payload
|
||||||
|
|
||||||
|
@ -464,8 +464,8 @@
|
|||||||
onSave={() => {
|
onSave={() => {
|
||||||
saveCode();
|
saveCode();
|
||||||
}}
|
}}
|
||||||
onChange={(e) => {
|
onChange={(value) => {
|
||||||
_code = e;
|
_code = value;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -88,14 +88,14 @@
|
|||||||
code={token?.text ?? ''}
|
code={token?.text ?? ''}
|
||||||
{attributes}
|
{attributes}
|
||||||
{save}
|
{save}
|
||||||
onCode={(e) => {
|
onCode={(value) => {
|
||||||
dispatch('code', e);
|
dispatch('code', value);
|
||||||
}}
|
}}
|
||||||
onSave={(e) => {
|
onSave={(e) => {
|
||||||
dispatch('update', {
|
dispatch('update', {
|
||||||
raw: token.raw,
|
raw: token.raw,
|
||||||
oldContent: token.text,
|
oldContent: token.text,
|
||||||
newContent: e
|
newContent: value
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
_value = formattedCode;
|
_value = formattedCode;
|
||||||
onChange({ value: _value });
|
onChange(_value);
|
||||||
await tick();
|
await tick();
|
||||||
|
|
||||||
toast.success($i18n.t('Code formatted successfully'));
|
toast.success($i18n.t('Code formatted successfully'));
|
||||||
@ -98,7 +98,7 @@
|
|||||||
EditorView.updateListener.of((e) => {
|
EditorView.updateListener.of((e) => {
|
||||||
if (e.docChanged) {
|
if (e.docChanged) {
|
||||||
_value = e.state.doc.toString();
|
_value = e.state.doc.toString();
|
||||||
onChange({ value: _value });
|
onChange(_value);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
editorTheme.of([]),
|
editorTheme.of([]),
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -35,6 +35,11 @@
|
|||||||
button {
|
button {
|
||||||
@apply cursor-pointer;
|
@apply cursor-pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input::placeholder,
|
||||||
|
textarea::placeholder {
|
||||||
|
color: theme(--color-gray-400);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@custom-variant hover (&:hover);
|
@custom-variant hover (&:hover);
|
||||||
|
Loading…
Reference in New Issue
Block a user