index.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0 maximum-scale=1.0">
  7. <meta name="description" content="A conversational AI system that listens, learns, and challenges">
  8. <meta property="og:title" content="ChatGPT">
  9. <meta property="og:image" content="https://openai.com/content/images/2022/11/ChatGPT.jpg">
  10. <meta property="og:description" content="A conversational AI system that listens, learns, and challenges">
  11. <meta property="og:url" content="https://g4f.ai">
  12. <link rel="stylesheet" href="/assets/css/style.css">
  13. <link rel="apple-touch-icon" sizes="180x180" href="/assets/img/apple-touch-icon.png">
  14. <link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon-32x32.png">
  15. <link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon-16x16.png">
  16. <link rel="manifest" href="/assets/img/site.webmanifest">
  17. <script src="/assets/js/icons.js"></script>
  18. <script src="/assets/js/highlightjs-copy.min.js"></script>
  19. <script src="/assets/js/chat.v1.js" defer></script>
  20. <script src="https://cdn.jsdelivr.net/npm/markdown-it@13.0.1/dist/markdown-it.min.js"></script>
  21. <link rel="stylesheet"
  22. href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/styles/base16/dracula.min.css">
  23. <script>
  24. const user_image = `<img src="/assets/img/user.png" alt="your avatar">`;
  25. const gpt_image = `<img src="/assets/img/gpt.png" alt="your avatar">`;
  26. </script>
  27. <style>
  28. .hljs {
  29. color: #e9e9f4;
  30. background: #28293629;
  31. border-radius: var(--border-radius-1);
  32. border: 1px solid var(--blur-border);
  33. font-size: 15px;
  34. }
  35. #message-input {
  36. margin-right: 30px;
  37. height: 82px;
  38. margin-left: 20px;
  39. }
  40. #message-input::-webkit-scrollbar {
  41. width: 5px;
  42. }
  43. /* Track */
  44. #message-input::-webkit-scrollbar-track {
  45. background: #f1f1f1;
  46. }
  47. /* Handle */
  48. #message-input::-webkit-scrollbar-thumb {
  49. background: #c7a2ff;
  50. }
  51. /* Handle on hover */
  52. #message-input::-webkit-scrollbar-thumb:hover {
  53. background: #8b3dff;
  54. }
  55. </style>
  56. <script src="/assets/js/highlight.min.js"></script>
  57. <script>window.conversation_id = `{{chat_id}}`</script>
  58. <title>g4f - gui</title>
  59. </head>
  60. <body>
  61. <div class="gradient"></div>
  62. <div class="row">
  63. <div class="box conversations">
  64. <div class="top">
  65. <button class="new_convo" onclick="new_conversation()">
  66. <i class="fa-regular fa-plus"></i>
  67. <span>New Conversation</span>
  68. </button>
  69. </div>
  70. <div class="bottom_buttons">
  71. <button onclick="delete_conversations()">
  72. <i class="fa-regular fa-trash"></i>
  73. <span>Clear Conversations</span>
  74. </button>
  75. <div class="info">
  76. <i class="fa-brands fa-telegram"></i>
  77. <span class="convo-title">tele ~ <a href="https://t.me/g4f_official">@g4f_official</a>
  78. </span>
  79. </div>
  80. <div class="info">
  81. <i class="fa-brands fa-github"></i>
  82. <span class="convo-title">github ~ <a href="https://github.com/xtekky/gpt4free">@gpt4free</a>
  83. </span>
  84. </div>
  85. <div class="info">
  86. <i class="fa-solid fa-star"></i>
  87. <span id="version_text" class="convo-title"></span>
  88. </div>
  89. </div>
  90. </div>
  91. <div class="conversation">
  92. <div class="stop_generating stop_generating-hidden">
  93. <button id="cancelButton">
  94. <span>Stop Generating</span>
  95. <i class="fa-regular fa-stop"></i>
  96. </button>
  97. </div>
  98. <div class="regenerate regenerate-hidden">
  99. <button id="regenerateButton">
  100. <span>Regenerate</span>
  101. <i class="fa-solid fa-rotate"></i>
  102. </button>
  103. </div>
  104. <div class="box" id="messages">
  105. </div>
  106. <div class="user-input">
  107. <div class="box input-box">
  108. <textarea id="message-input" placeholder="Ask a question" cols="30" rows="10"
  109. style="white-space: pre-wrap;resize: none;"></textarea>
  110. <label for="image" title="Works only with Bing and OpenaiChat">
  111. <input type="file" id="image" name="image" accept="image/png, image/gif, image/jpeg" required/>
  112. <i class="fa-regular fa-image"></i>
  113. </label>
  114. <label for="file">
  115. <input type="file" id="file" name="file" accept="text/plain, text/html, text/xml, application/json, text/javascript, .sh, .py, .php, .css, .yaml, .sql, .svg, .log, .csv, .twig, .md" required/>
  116. <i class="fa-solid fa-paperclip"></i>
  117. </label>
  118. <div id="send-button">
  119. <i class="fa-solid fa-paper-plane-top"></i>
  120. </div>
  121. </div>
  122. </div>
  123. <div class="buttons">
  124. <div class="field">
  125. <select name="model" id="model">
  126. <option value="">Model: Default</option>
  127. <option value="gpt-4">gpt-4</option>
  128. <option value="gpt-3.5-turbo">gpt-3.5-turbo</option>
  129. <option value="llama2-70b">llama2-70b</option>
  130. <option value="gemini-pro">gemini-pro</option>
  131. <option value="">----</option>
  132. </select>
  133. </div>
  134. <div class="field">
  135. <select name="jailbreak" id="jailbreak" style="display: none;">
  136. <option value="default" selected>Set Jailbreak</option>
  137. <option value="gpt-math-1.0">math 1.0</option>
  138. <option value="gpt-dude-1.0">dude 1.0</option>
  139. <option value="gpt-dan-1.0">dan 1.0</option>
  140. <option value="gpt-dan-2.0">dan 2.0</option>
  141. <option value="gpt-dev-2.0">dev 2.0</option>
  142. <option value="gpt-evil-1.0">evil 1.0</option>
  143. </select>
  144. <div class="field">
  145. <select name="provider" id="provider">
  146. <option value="">Provider: Auto</option>
  147. <option value="Bing">Bing</option>
  148. <option value="OpenaiChat">OpenaiChat</option>
  149. <option value="HuggingChat">HuggingChat</option>
  150. <option value="Bard">Bard</option>
  151. <option value="Liaobots">Liaobots</option>
  152. <option value="Phind">Phind</option>
  153. <option value="">----</option>
  154. </select>
  155. </div>
  156. </div>
  157. <div class="field">
  158. <input type="checkbox" id="switch" />
  159. <label for="switch"></label>
  160. <span class="about">Web Access</span>
  161. </div>
  162. <div class="field">
  163. <input type="checkbox" id="patch" />
  164. <label for="patch" title="Works only with Bing and some other providers"></label>
  165. <span class="about">Image Generator</span>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. <div class="mobile-sidebar">
  171. <i class="fa-solid fa-bars"></i>
  172. </div>
  173. <script>
  174. </script>
  175. </body>
  176. </html>