This commit is contained in:
Timothy Jaeryang Baek 2025-02-04 23:44:51 -08:00
parent e349e26cd8
commit 9624493b55
4 changed files with 11 additions and 4 deletions

View File

@ -883,7 +883,11 @@ async def chat_completion(
**(
{"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 {}
),
}

View File

@ -11,7 +11,8 @@ const packages = [
'regex',
'sympy',
'tiktoken',
'seaborn'
'seaborn',
'pytz'
];
import { loadPyodide } from 'pyodide';

View File

@ -132,7 +132,8 @@
code.includes('seaborn') ? 'seaborn' : null,
code.includes('sympy') ? 'sympy' : null,
code.includes('tiktoken') ? 'tiktoken' : null,
code.includes('matplotlib') ? 'matplotlib' : null
code.includes('matplotlib') ? 'matplotlib' : null,
code.includes('pytz') ? 'pytz' : null
].filter(Boolean);
console.log(packages);

View File

@ -118,7 +118,8 @@
code.includes('re') ? 'regex' : null,
code.includes('seaborn') ? 'seaborn' : null,
code.includes('sympy') ? 'sympy' : null,
code.includes('tiktoken') ? 'tiktoken' : null
code.includes('tiktoken') ? 'tiktoken' : null,
code.includes('pytz') ? 'pytz' : null
].filter(Boolean);
const pyodideWorker = new PyodideWorker();