Sfoglia il codice sorgente

导出聊天记录

S0025136190 7 mesi fa
parent
commit
5ef0ac83b9
1 ha cambiato i file con 10 aggiunte e 1 eliminazioni
  1. 10 1
      app/components/sidebar.tsx

+ 10 - 1
app/components/sidebar.tsx

@@ -256,7 +256,16 @@ export const SideBar = (props: { className?: string }) => {
                 label: (
                   <a onClick={async () => {
                     try {
-                      const blob = await api.post(`/bigmodel/api/dialog/export/${child.key}`, {}, { responseType: 'blob' });
+                      let blob = null;
+                      if (getType() === 'bigModel') {
+                        if (chatMode === 'LOCAL') {
+                          blob = await api.post(`/bigmodel/api/dialog/export/${child.key}`, {}, { responseType: 'blob' });
+                        } else {
+                          blob = await api.post(`/takai/api/dialog/export/${child.key}`, {}, { responseType: 'blob' });
+                        }
+                      } else {
+                        blob = await api.post(`/bigmodel/api/dialog/export/${child.key}`, {}, { responseType: 'blob' });
+                      }
                       const fileName = `${child.label}.xlsx`;
                       downloadFile(blob, fileName);
                     } catch (error) {