monra commited on
Commit
ebe8c94
1 Parent(s): abb67fc

Fix: chat_id undefined

Browse files
Files changed (2) hide show
  1. client/html/index.html +1 -0
  2. client/js/chat.js +0 -1
client/html/index.html CHANGED
@@ -97,6 +97,7 @@
97
  </div>
98
 
99
  <!-- scripts -->
 
100
  <script src="/assets/js/icons.js"></script>
101
  <script src="/assets/js/chat.js" defer></script>
102
  <script src="https://cdn.jsdelivr.net/npm/markdown-it@latest/dist/markdown-it.min.js"></script>
 
97
  </div>
98
 
99
  <!-- scripts -->
100
+ <script>window.conversation_id = "{{ chat_id }}";</script>
101
  <script src="/assets/js/icons.js"></script>
102
  <script src="/assets/js/chat.js" defer></script>
103
  <script src="https://cdn.jsdelivr.net/npm/markdown-it@latest/dist/markdown-it.min.js"></script>
client/js/chat.js CHANGED
@@ -12,7 +12,6 @@ const send_button = document.querySelector(`#send-button`);
12
  const user_image = `<img src="/assets/img/user.png" alt="User Avatar">`;
13
  const gpt_image = `<img src="/assets/img/gpt.png" alt="GPT Avatar">`;
14
  let prompt_lock = false;
15
- window.conversation_id = `{{chat_id}}`;
16
 
17
  hljs.addPlugin(new CopyButtonPlugin());
18
 
 
12
  const user_image = `<img src="/assets/img/user.png" alt="User Avatar">`;
13
  const gpt_image = `<img src="/assets/img/gpt.png" alt="GPT Avatar">`;
14
  let prompt_lock = false;
 
15
 
16
  hljs.addPlugin(new CopyButtonPlugin());
17