diff --git a/web/src/pages/setting/List.tsx b/web/src/pages/setting/List.tsx
index 35c8191db..b86a380df 100644
--- a/web/src/pages/setting/List.tsx
+++ b/web/src/pages/setting/List.tsx
@@ -37,7 +37,7 @@ const SettingList = () => {
type: 'settingModel/my_llm',
payload: {},
});
- }, []);
+ }, [dispatch]);
return (
(methods, request);
+
+export default chatService;
diff --git a/web/src/utils/api.ts b/web/src/utils/api.ts
index d0afb1847..f813071cf 100644
--- a/web/src/utils/api.ts
+++ b/web/src/utils/api.ts
@@ -42,4 +42,14 @@ export default {
document_create: `${api_host}/document/create`,
document_run: `${api_host}/document/run`,
document_change_parser: `${api_host}/document/change_parser`,
+
+ setDialog: `${api_host}/dialog/set`,
+ getDialog: `${api_host}/dialog/get`,
+ listDialog: `${api_host}/dialog/list`,
+
+ setConversation: `${api_host}/conversation/set`,
+ getConversation: `${api_host}/conversation/get`,
+ listConversation: `${api_host}/conversation/list`,
+ removeConversation: `${api_host}/conversation/rm`,
+ completeConversation: `${api_host}/conversation/completion`,
};
diff --git a/web/src/utils/index.ts b/web/src/utils/index.ts
index 2eec00f3d..f27890471 100644
--- a/web/src/utils/index.ts
+++ b/web/src/utils/index.ts
@@ -5,22 +5,23 @@
*/
// import numeral from 'numeral';
-import JSEncrypt from 'jsencrypt';
import { Base64 } from 'js-base64';
+import JSEncrypt from 'jsencrypt';
export const getWidth = () => {
return { width: window.innerWidth };
};
export const rsaPsw = (password: string) => {
- const pub = "-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArq9XTUSeYr2+N1h3Afl/z8Dse/2yD0ZGrKwx+EEEcdsBLca9Ynmx3nIB5obmLlSfmskLpBo0UACBmB5rEjBp2Q2f3AG3Hjd4B+gNCG6BDaawuDlgANIhGnaTLrIqWrrcm4EMzJOnAOI1fgzJRsOOUEfaS318Eq9OVO3apEyCCt0lOQK6PuksduOjVxtltDav+guVAA068NrPYmRNabVKRNLJpL8w4D44sfth5RvZ3q9t+6RTArpEtc5sh5ChzvqPOzKGMXW83C95TxmXqpbK6olN4RevSfVjEAgCydH6HN6OhtOQEcnrU97r9H0iZOWwbw3pVrZiUkuRD1R56Wzs2wIDAQAB-----END PUBLIC KEY-----"
- const encryptor = new JSEncrypt()
+ const pub =
+ '-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArq9XTUSeYr2+N1h3Afl/z8Dse/2yD0ZGrKwx+EEEcdsBLca9Ynmx3nIB5obmLlSfmskLpBo0UACBmB5rEjBp2Q2f3AG3Hjd4B+gNCG6BDaawuDlgANIhGnaTLrIqWrrcm4EMzJOnAOI1fgzJRsOOUEfaS318Eq9OVO3apEyCCt0lOQK6PuksduOjVxtltDav+guVAA068NrPYmRNabVKRNLJpL8w4D44sfth5RvZ3q9t+6RTArpEtc5sh5ChzvqPOzKGMXW83C95TxmXqpbK6olN4RevSfVjEAgCydH6HN6OhtOQEcnrU97r9H0iZOWwbw3pVrZiUkuRD1R56Wzs2wIDAQAB-----END PUBLIC KEY-----';
+ const encryptor = new JSEncrypt();
- encryptor.setPublicKey(pub)
+ encryptor.setPublicKey(pub);
- return encryptor.encrypt(Base64.encode(password))
-}
+ return encryptor.encrypt(Base64.encode(password));
+};
export default {
getWidth,
- rsaPsw
+ rsaPsw,
};