mirror of
https://github.com/open-webui/open-webui
synced 2025-02-22 21:32:32 +00:00
refac
This commit is contained in:
parent
e349e26cd8
commit
9624493b55
@ -883,7 +883,11 @@ async def chat_completion(
|
|||||||
**(
|
**(
|
||||||
{"function_calling": "native"}
|
{"function_calling": "native"}
|
||||||
if form_data.get("params", {}).get("function_calling") == "native"
|
if form_data.get("params", {}).get("function_calling") == "native"
|
||||||
or model_info.params.model_dump().get("function_calling") == "native"
|
or (
|
||||||
|
model_info
|
||||||
|
and model_info.params.model_dump().get("function_calling")
|
||||||
|
== "native"
|
||||||
|
)
|
||||||
else {}
|
else {}
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,8 @@ const packages = [
|
|||||||
'regex',
|
'regex',
|
||||||
'sympy',
|
'sympy',
|
||||||
'tiktoken',
|
'tiktoken',
|
||||||
'seaborn'
|
'seaborn',
|
||||||
|
'pytz'
|
||||||
];
|
];
|
||||||
|
|
||||||
import { loadPyodide } from 'pyodide';
|
import { loadPyodide } from 'pyodide';
|
||||||
|
@ -132,7 +132,8 @@
|
|||||||
code.includes('seaborn') ? 'seaborn' : null,
|
code.includes('seaborn') ? 'seaborn' : null,
|
||||||
code.includes('sympy') ? 'sympy' : null,
|
code.includes('sympy') ? 'sympy' : null,
|
||||||
code.includes('tiktoken') ? 'tiktoken' : null,
|
code.includes('tiktoken') ? 'tiktoken' : null,
|
||||||
code.includes('matplotlib') ? 'matplotlib' : null
|
code.includes('matplotlib') ? 'matplotlib' : null,
|
||||||
|
code.includes('pytz') ? 'pytz' : null
|
||||||
].filter(Boolean);
|
].filter(Boolean);
|
||||||
|
|
||||||
console.log(packages);
|
console.log(packages);
|
||||||
|
@ -118,7 +118,8 @@
|
|||||||
code.includes('re') ? 'regex' : null,
|
code.includes('re') ? 'regex' : null,
|
||||||
code.includes('seaborn') ? 'seaborn' : null,
|
code.includes('seaborn') ? 'seaborn' : null,
|
||||||
code.includes('sympy') ? 'sympy' : null,
|
code.includes('sympy') ? 'sympy' : null,
|
||||||
code.includes('tiktoken') ? 'tiktoken' : null
|
code.includes('tiktoken') ? 'tiktoken' : null,
|
||||||
|
code.includes('pytz') ? 'pytz' : null
|
||||||
].filter(Boolean);
|
].filter(Boolean);
|
||||||
|
|
||||||
const pyodideWorker = new PyodideWorker();
|
const pyodideWorker = new PyodideWorker();
|
||||||
|
Loading…
Reference in New Issue
Block a user