add support for Tencent Hunyuan (#2015)
### What problem does this PR solve? #1853 ### Type of change - [X] New Feature (non-breaking change which adds functionality) Co-authored-by: Zhedong Cen <cenzhedong2@126.com>
This commit is contained in:
@@ -163,6 +163,33 @@ export const useSubmitVolcEngine = () => {
|
||||
};
|
||||
};
|
||||
|
||||
export const useSubmitHunyuan = () => {
|
||||
const { addLlm, loading } = useAddLlm();
|
||||
const {
|
||||
visible: HunyuanAddingVisible,
|
||||
hideModal: hideHunyuanAddingModal,
|
||||
showModal: showHunyuanAddingModal,
|
||||
} = useSetModalState();
|
||||
|
||||
const onHunyuanAddingOk = useCallback(
|
||||
async (payload: IAddLlmRequestBody) => {
|
||||
const ret = await addLlm(payload);
|
||||
if (ret === 0) {
|
||||
hideHunyuanAddingModal();
|
||||
}
|
||||
},
|
||||
[hideHunyuanAddingModal, addLlm],
|
||||
);
|
||||
|
||||
return {
|
||||
HunyuanAddingLoading: loading,
|
||||
onHunyuanAddingOk,
|
||||
HunyuanAddingVisible,
|
||||
hideHunyuanAddingModal,
|
||||
showHunyuanAddingModal,
|
||||
};
|
||||
};
|
||||
|
||||
export const useSubmitBedrock = () => {
|
||||
const { addLlm, loading } = useAddLlm();
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user