Keldos commited on
Commit
e691f5a
·
2 Parent(s): d443c93 f1f92ba

Merge branch 'main' into UI-new

Browse files
modules/models/azure.py CHANGED
@@ -1,4 +1,4 @@
1
- from langchain.chat_models import AzureChatOpenAI
2
  import os
3
 
4
  from .base_model import Base_Chat_Langchain_Client
@@ -14,4 +14,5 @@ class Azure_OpenAI_Client(Base_Chat_Langchain_Client):
14
  deployment_name=os.environ["AZURE_DEPLOYMENT_NAME"],
15
  openai_api_key=os.environ["AZURE_OPENAI_API_KEY"],
16
  openai_api_type="azure",
17
- )
 
 
1
+ from langchain.chat_models import AzureChatOpenAI, ChatOpenAI
2
  import os
3
 
4
  from .base_model import Base_Chat_Langchain_Client
 
14
  deployment_name=os.environ["AZURE_DEPLOYMENT_NAME"],
15
  openai_api_key=os.environ["AZURE_OPENAI_API_KEY"],
16
  openai_api_type="azure",
17
+ streaming=True
18
+ )
web_assets/javascript/updater.js CHANGED
@@ -86,12 +86,16 @@ async function updateLatestVersion() {
86
  versionInfoElement.innerHTML = marked.parse(infoMessage, {mangle: false, headerIds: false});
87
  console.log(`New version ${latestVersion} found!`);
88
  disableUpdateBtn_enableCancelBtn();
 
 
89
  } else if (localVersionTime < latestVersionTime) {
90
  const infoMessage = `Local version check failed, it seems to be a local rivision. \n\nBut latest revision is ${latestVersionInfo}. Try ${manualUpdateInfo}.`
91
  versionInfoElement.innerHTML = marked.parse(infoMessage, {mangle: false, headerIds: false});
92
  console.log(`New version ${latestVersion} found!`);
93
  disableUpdateBtn_enableCancelBtn();
94
  // if (!isInIframe) openUpdateToast();
 
 
95
  } else {
96
  noUpdate("Local version check failed, it seems to be a local rivision. <br>But your revision is newer than the latest release.");
97
  }
 
86
  versionInfoElement.innerHTML = marked.parse(infoMessage, {mangle: false, headerIds: false});
87
  console.log(`New version ${latestVersion} found!`);
88
  disableUpdateBtn_enableCancelBtn();
89
+ localStorage.setItem('isLatestVersion', 'false');
90
+ isLatestVersion = false;
91
  } else if (localVersionTime < latestVersionTime) {
92
  const infoMessage = `Local version check failed, it seems to be a local rivision. \n\nBut latest revision is ${latestVersionInfo}. Try ${manualUpdateInfo}.`
93
  versionInfoElement.innerHTML = marked.parse(infoMessage, {mangle: false, headerIds: false});
94
  console.log(`New version ${latestVersion} found!`);
95
  disableUpdateBtn_enableCancelBtn();
96
  // if (!isInIframe) openUpdateToast();
97
+ localStorage.setItem('isLatestVersion', 'false');
98
+ isLatestVersion = false;
99
  } else {
100
  noUpdate("Local version check failed, it seems to be a local rivision. <br>But your revision is newer than the latest release.");
101
  }
web_assets/stylesheet/chatbot.css CHANGED
@@ -97,6 +97,9 @@ hr.append-display {
97
  width: auto !important;
98
  border-bottom-right-radius: 0 !important;
99
  }
 
 
 
100
  .message-row.user-row {
101
  justify-content: flex-end;
102
  }
@@ -120,7 +123,10 @@ hr.append-display {
120
  max-height: calc(100vh - 140px - var(--line-sm)*1rem - 2*var(--block-label-margin) );
121
  }
122
  [data-testid = "bot"] {
123
- max-width: calc(98% - 20px) !important;
 
 
 
124
  }
125
  .chatbot-avatar {
126
  display: none;
 
97
  width: auto !important;
98
  border-bottom-right-radius: 0 !important;
99
  }
100
+ .message-row {
101
+ align-self: unset !important;
102
+ }
103
  .message-row.user-row {
104
  justify-content: flex-end;
105
  }
 
123
  max-height: calc(100vh - 140px - var(--line-sm)*1rem - 2*var(--block-label-margin) );
124
  }
125
  [data-testid = "bot"] {
126
+ max-width: calc(100% - 84px) !important;
127
+ }
128
+ [data-testid = "user"] {
129
+ max-width: calc(100% - 84px) !important;
130
  }
131
  .chatbot-avatar {
132
  display: none;