chore: hf api use proxy

This commit is contained in:
jialin
2024-11-20 17:51:28 +08:00
parent 66e506db07
commit 22f90a505c
6 changed files with 50 additions and 44 deletions
@@ -131,6 +131,15 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
form.setFieldValue('backend_parameters', list);
}, []);
const handleBackendChange = useCallback((val: string) => {
if (val === backendOptionsMap.llamaBox) {
form.setFieldsValue({
distributed_inference_across_workers: true,
cpu_offloading: true
});
}
}, []);
const collapseItems = useMemo(() => {
const children = (
<>
@@ -239,6 +248,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
)}
<Form.Item name="backend">
<SealSelect
onChange={handleBackendChange}
label={intl.formatMessage({ id: 'models.form.backend' })}
options={[
{