2023-10-06 18:52:17 +00:00
|
|
|
<!DOCTYPE html>
|
2024-03-16 09:48:37 +00:00
|
|
|
<html lang="en" data-framework="javascript">
|
2023-10-06 18:52:17 +00:00
|
|
|
|
2023-10-09 22:47:58 +00:00
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0 maximum-scale=1.0">
|
|
|
|
<meta name="description" content="A conversational AI system that listens, learns, and challenges">
|
|
|
|
<meta property="og:title" content="ChatGPT">
|
|
|
|
<meta property="og:image" content="https://openai.com/content/images/2022/11/ChatGPT.jpg">
|
|
|
|
<meta property="og:description" content="A conversational AI system that listens, learns, and challenges">
|
|
|
|
<meta property="og:url" content="https://g4f.ai">
|
2024-03-16 09:48:37 +00:00
|
|
|
<link rel="stylesheet" href="/static/css/style.css">
|
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/img/apple-touch-icon.png">
|
|
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon-32x32.png">
|
|
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/img/favicon-16x16.png">
|
|
|
|
<link rel="manifest" href="/static/img/site.webmanifest">
|
|
|
|
<script src="/static/js/icons.js"></script>
|
|
|
|
<script src="/static/js/highlightjs-copy.min.js"></script>
|
|
|
|
<script src="/static/js/chat.v1.js" defer></script>
|
2023-10-09 22:47:58 +00:00
|
|
|
<script src="https://cdn.jsdelivr.net/npm/markdown-it@13.0.1/dist/markdown-it.min.js"></script>
|
|
|
|
<link rel="stylesheet"
|
|
|
|
href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/styles/base16/dracula.min.css">
|
2024-02-19 17:29:23 +00:00
|
|
|
<script>
|
|
|
|
MathJax = {
|
|
|
|
chtml: {
|
|
|
|
scale: 1,
|
|
|
|
displayAlign: 'left'
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
2024-02-24 19:09:38 +00:00
|
|
|
<script id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" async></script>
|
|
|
|
<script type="module" src="https://cdn.jsdelivr.net/npm/mistral-tokenizer-js" async>
|
2024-03-06 16:22:04 +00:00
|
|
|
import mistralTokenizer from "mistral-tokenizer-js"
|
2024-02-24 19:09:38 +00:00
|
|
|
</script>
|
|
|
|
<script type="module" src="https://belladoreai.github.io/llama-tokenizer-js/llama-tokenizer.js" async>
|
2024-03-06 16:22:04 +00:00
|
|
|
import llamaTokenizer from "llama-tokenizer-js"
|
2024-02-24 19:09:38 +00:00
|
|
|
</script>
|
|
|
|
<script src="https://unpkg.com/gpt-tokenizer/dist/cl100k_base.js" async></script>
|
2024-04-09 03:54:47 +00:00
|
|
|
<script src="/static/js/text_to_speech/index.js" async></script>
|
2024-04-17 08:33:23 +00:00
|
|
|
<!--
|
|
|
|
<script src="/static/js/whisper-web/index.js" async></script>
|
|
|
|
-->
|
2023-10-09 22:47:58 +00:00
|
|
|
<script>
|
2024-03-16 09:48:37 +00:00
|
|
|
const user_image = '<img src="/static/img/user.png" alt="your avatar">';
|
|
|
|
const gpt_image = '<img src="/static/img/gpt.png" alt="your avatar">';
|
2023-10-09 22:47:58 +00:00
|
|
|
</script>
|
2024-03-16 09:48:37 +00:00
|
|
|
<script src="/static/js/highlight.min.js"></script>
|
|
|
|
<script>window.conversation_id = "{{chat_id}}"</script>
|
2023-10-09 22:47:58 +00:00
|
|
|
<title>g4f - gui</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div class="gradient"></div>
|
|
|
|
<div class="row">
|
2024-04-08 21:27:54 +00:00
|
|
|
<div class="box conversations">
|
2023-10-09 22:47:58 +00:00
|
|
|
<div class="top">
|
|
|
|
<button class="new_convo" onclick="new_conversation()">
|
|
|
|
<i class="fa-regular fa-plus"></i>
|
|
|
|
<span>New Conversation</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="bottom_buttons">
|
2024-04-11 00:40:30 +00:00
|
|
|
<!--
|
|
|
|
<button onclick="open_album();">
|
|
|
|
<i class="fa-solid fa-toolbox"></i>
|
|
|
|
<span>Images Album</span>
|
|
|
|
</button>
|
|
|
|
-->
|
2024-04-08 05:24:00 +00:00
|
|
|
<button onclick="open_settings();">
|
|
|
|
<i class="fa-solid fa-toolbox"></i>
|
|
|
|
<span>Open Settings</span>
|
2024-03-14 17:49:41 +00:00
|
|
|
</button>
|
2024-04-08 21:27:54 +00:00
|
|
|
<div class="info">
|
|
|
|
<i class="fa-brands fa-discord"></i>
|
|
|
|
<span class="convo-title">discord ~ <a href="https://discord.gg/XfybzPXPH5">discord.gg/XfybzPXPH5</a>
|
|
|
|
</span>
|
|
|
|
</div>
|
2023-10-09 22:47:58 +00:00
|
|
|
<div class="info">
|
|
|
|
<i class="fa-brands fa-github"></i>
|
2024-04-08 21:27:54 +00:00
|
|
|
<span class="convo-title">github ~ <a href="https://github.com/xtekky/gpt4free">@xtekky/gpt4free</a>
|
2023-10-09 22:47:58 +00:00
|
|
|
</span>
|
2023-10-06 18:52:17 +00:00
|
|
|
</div>
|
2023-12-07 06:18:05 +00:00
|
|
|
<div class="info">
|
|
|
|
<i class="fa-solid fa-star"></i>
|
|
|
|
<span id="version_text" class="convo-title"></span>
|
|
|
|
</div>
|
2023-10-06 18:52:17 +00:00
|
|
|
</div>
|
2024-04-11 00:40:30 +00:00
|
|
|
</div>
|
|
|
|
<div class="images hidden">
|
|
|
|
|
2023-10-09 22:47:58 +00:00
|
|
|
</div>
|
2024-04-08 05:24:00 +00:00
|
|
|
<div class="settings hidden">
|
2024-04-08 21:27:54 +00:00
|
|
|
<div class="paper">
|
2024-04-17 08:33:23 +00:00
|
|
|
<h3>Settings</h3>
|
2024-04-08 05:24:00 +00:00
|
|
|
<div class="field">
|
|
|
|
<span class="label">Web Access</span>
|
|
|
|
<input type="checkbox" id="switch" />
|
|
|
|
<label for="switch" class="toogle" title="Add the pages of the first 5 search results to the query."></label>
|
2024-04-07 08:36:13 +00:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2024-04-08 05:24:00 +00:00
|
|
|
<span class="label">Disable History</span>
|
|
|
|
<input type="checkbox" id="history" />
|
|
|
|
<label for="history" class="toogle" title="To improve the reaction time or if you have trouble with large conversations."></label>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<span class="label">Hide System prompt</span>
|
|
|
|
<input type="checkbox" id="hide-systemPrompt" />
|
|
|
|
<label for="hide-systemPrompt" class="toogle" title="For more space on phones"></label>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<span class="label">Auto continue</span>
|
|
|
|
<input id="auto_continue" type="checkbox" name="auto_continue" checked/>
|
2024-04-08 21:27:54 +00:00
|
|
|
<label for="auto_continue" class="toogle" title="Continue large responses in OpenaiChat"></label>
|
|
|
|
</div>
|
|
|
|
<div class="field box">
|
2024-04-11 00:40:30 +00:00
|
|
|
<label for="message-input-height" class="label" title="">Input max. height</label>
|
2024-04-08 21:27:54 +00:00
|
|
|
<input type="number" id="message-input-height" value="200"/>
|
|
|
|
</div>
|
|
|
|
<div class="field box">
|
|
|
|
<label for="recognition-language" class="label" title="">Speech recognition lang</label>
|
|
|
|
<input type="text" id="recognition-language" value="" placeholder="navigator.language"/>
|
2024-04-08 05:24:00 +00:00
|
|
|
</div>
|
|
|
|
<div class="field box">
|
2024-04-11 00:40:30 +00:00
|
|
|
<label for="Bing-api_key" class="label" title="">Bing:</label>
|
|
|
|
<textarea id="Bing-api_key" name="Bing[api_key]" class="BingCreateImages-api_key" placeholder=""_U" cookie"></textarea>
|
2024-04-07 08:36:13 +00:00
|
|
|
</div>
|
|
|
|
<div class="field box">
|
2024-04-11 00:40:30 +00:00
|
|
|
<label for="DeepInfra-api_key" class="label" title="">DeepInfra:</label>
|
|
|
|
<textarea id="DeepInfra-api_key" name="DeepInfra[api_key]" class="DeepInfraImage-api_key" placeholder="api_key"></textarea>
|
2024-04-07 08:36:13 +00:00
|
|
|
</div>
|
|
|
|
<div class="field box">
|
2024-04-22 16:08:04 +00:00
|
|
|
<label for="GeminiPro-api_key" class="label" title="">Gemini API:</label>
|
2024-04-11 00:40:30 +00:00
|
|
|
<textarea id="GeminiPro-api_key" name="GeminiPro[api_key]" placeholder="api_key"></textarea>
|
2024-04-07 08:36:13 +00:00
|
|
|
</div>
|
2024-04-08 05:24:00 +00:00
|
|
|
<div class="field box">
|
2024-04-11 00:40:30 +00:00
|
|
|
<label for="Groq-api_key" class="label" title="">Groq:</label>
|
|
|
|
<textarea id="Groq-api_key" name="Groq[api_key]" placeholder="api_key"></textarea>
|
2024-04-08 05:24:00 +00:00
|
|
|
</div>
|
2024-04-07 08:36:13 +00:00
|
|
|
<div class="field box">
|
2024-04-11 00:40:30 +00:00
|
|
|
<label for="HuggingFace-api_key" class="label" title="">HuggingFace:</label>
|
|
|
|
<textarea id="HuggingFace-api_key" name="HuggingFace[api_key]" placeholder="api_key"></textarea>
|
2024-04-07 08:36:13 +00:00
|
|
|
</div>
|
2024-04-10 06:14:50 +00:00
|
|
|
<div class="field box">
|
2024-04-18 18:18:51 +00:00
|
|
|
<label for="Openai-api_key" class="label" title="">OpenAI API:</label>
|
2024-04-11 00:40:30 +00:00
|
|
|
<textarea id="Openai-api_key" name="Openai[api_key]" placeholder="api_key"></textarea>
|
2024-04-10 06:14:50 +00:00
|
|
|
</div>
|
2024-04-07 08:36:13 +00:00
|
|
|
<div class="field box">
|
2024-04-18 18:18:51 +00:00
|
|
|
<label for="OpenaiAccount-api_key" class="label" title="">OpenAI ChatGPT:</label>
|
2024-04-23 17:56:52 +00:00
|
|
|
<textarea id="OpenaiAccount-api_key" name="OpenaiAccount[api_key]" class="OpenaiChat-api_key" placeholder="access_key"></textarea>
|
2024-04-06 15:52:33 +00:00
|
|
|
</div>
|
2024-04-10 06:14:50 +00:00
|
|
|
<div class="field box">
|
2024-04-11 00:40:30 +00:00
|
|
|
<label for="OpenRouter-api_key" class="label" title="">OpenRouter:</label>
|
|
|
|
<textarea id="OpenRouter-api_key" name="OpenRouter[api_key]" placeholder="api_key"></textarea>
|
2024-04-10 06:14:50 +00:00
|
|
|
</div>
|
2024-04-22 16:08:04 +00:00
|
|
|
<div class="field box">
|
|
|
|
<label for="Replicate-api_key" class="label" title="">Replicate:</label>
|
|
|
|
<textarea id="Replicate-api_key" name="Replicate[api_key]" class="ReplicateImage-api_key" placeholder="api_key"></textarea>
|
|
|
|
</div>
|
2024-04-08 05:24:00 +00:00
|
|
|
</div>
|
|
|
|
<div class="bottom_buttons">
|
|
|
|
<button onclick="delete_conversations()">
|
|
|
|
<i class="fa-regular fa-trash"></i>
|
|
|
|
<span>Clear Conversations</span>
|
|
|
|
</button>
|
|
|
|
<button onclick="save_storage()">
|
|
|
|
<i class="fa-solid fa-download"></i>
|
|
|
|
<a href="" onclick="return false;">Export Conversations</a>
|
|
|
|
</button>
|
|
|
|
</div>
|
2024-04-06 15:52:33 +00:00
|
|
|
</div>
|
2023-10-09 22:47:58 +00:00
|
|
|
<div class="conversation">
|
2024-03-09 02:10:59 +00:00
|
|
|
<textarea id="systemPrompt" class="box" placeholder="System prompt"></textarea>
|
2024-02-29 13:44:51 +00:00
|
|
|
<div id="messages" class="box"></div>
|
|
|
|
<div class="toolbar">
|
|
|
|
<div id="input-count" class="">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="stop_generating stop_generating-hidden">
|
|
|
|
<button id="cancelButton">
|
|
|
|
<span>Stop Generating</span>
|
|
|
|
<i class="fa-regular fa-stop"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="regenerate regenerate-hidden">
|
|
|
|
<button id="regenerateButton">
|
|
|
|
<span>Regenerate</span>
|
|
|
|
<i class="fa-solid fa-rotate"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
2023-10-09 22:47:58 +00:00
|
|
|
</div>
|
|
|
|
<div class="user-input">
|
|
|
|
<div class="box input-box">
|
|
|
|
<textarea id="message-input" placeholder="Ask a question" cols="30" rows="10"
|
|
|
|
style="white-space: pre-wrap;resize: none;"></textarea>
|
2024-03-25 20:06:51 +00:00
|
|
|
<label class="file-label image-label" for="image" title="Works with Bing, Gemini, OpenaiChat and You">
|
2024-02-11 00:59:57 +00:00
|
|
|
<input type="file" id="image" name="image" accept="image/*" required/>
|
2024-01-13 14:37:36 +00:00
|
|
|
<i class="fa-regular fa-image"></i>
|
|
|
|
</label>
|
2024-03-25 20:06:51 +00:00
|
|
|
<label class="file-label image-label" for="camera">
|
2024-02-11 00:59:57 +00:00
|
|
|
<input type="file" id="camera" name="camera" accept="image/*" capture="camera" required/>
|
|
|
|
<i class="fa-solid fa-camera"></i>
|
|
|
|
</label>
|
2024-03-19 17:48:32 +00:00
|
|
|
<label class="file-label" for="file">
|
2024-01-23 00:47:55 +00:00
|
|
|
<input type="file" id="file" name="file" accept="text/plain, text/html, text/xml, application/json, text/javascript, .sh, .py, .php, .css, .yaml, .sql, .log, .csv, .twig, .md" required/>
|
2024-01-14 06:45:41 +00:00
|
|
|
<i class="fa-solid fa-paperclip"></i>
|
|
|
|
</label>
|
2024-04-08 21:27:54 +00:00
|
|
|
<label class="micro-label" for="micro">
|
|
|
|
<i class="fa-solid fa-microphone-slash"></i>
|
|
|
|
</label>
|
2023-10-09 22:47:58 +00:00
|
|
|
<div id="send-button">
|
|
|
|
<i class="fa-solid fa-paper-plane-top"></i>
|
|
|
|
</div>
|
2023-10-06 18:52:17 +00:00
|
|
|
</div>
|
2023-10-09 22:47:58 +00:00
|
|
|
</div>
|
|
|
|
<div class="buttons">
|
|
|
|
<div class="field">
|
2024-01-14 06:45:41 +00:00
|
|
|
<select name="model" id="model">
|
|
|
|
<option value="">Model: Default</option>
|
|
|
|
<option value="gpt-4">gpt-4</option>
|
|
|
|
<option value="gpt-3.5-turbo">gpt-3.5-turbo</option>
|
|
|
|
<option value="llama2-70b">llama2-70b</option>
|
2024-04-19 12:10:56 +00:00
|
|
|
<option value="llama3-70b-instruct">llama3-70b-instruct</option>
|
2024-01-14 06:45:41 +00:00
|
|
|
<option value="gemini-pro">gemini-pro</option>
|
|
|
|
<option value="">----</option>
|
|
|
|
</select>
|
2024-03-14 17:49:41 +00:00
|
|
|
<select name="model2" id="model2" class="hidden"></select>
|
2024-03-13 16:52:48 +00:00
|
|
|
</div>
|
2023-10-09 22:47:58 +00:00
|
|
|
<div class="field">
|
2024-04-08 05:24:00 +00:00
|
|
|
<select name="provider" id="provider">
|
|
|
|
<option value="">Provider: Auto</option>
|
|
|
|
<option value="Bing">Bing</option>
|
2024-04-23 17:56:52 +00:00
|
|
|
<option value="OpenaiChat">OpenAI ChatGPT</option>
|
2024-04-08 05:24:00 +00:00
|
|
|
<option value="Gemini">Gemini</option>
|
|
|
|
<option value="Liaobots">Liaobots</option>
|
2024-04-23 17:56:52 +00:00
|
|
|
<option value="MetaAI">Meta AI</option>
|
2024-04-08 05:24:00 +00:00
|
|
|
<option value="You">You</option>
|
|
|
|
<option value="">----</option>
|
2023-10-09 22:47:58 +00:00
|
|
|
</select>
|
2024-02-11 07:29:23 +00:00
|
|
|
</div>
|
2023-10-06 18:52:17 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-10-09 22:47:58 +00:00
|
|
|
</div>
|
2023-10-06 18:52:17 +00:00
|
|
|
<div class="mobile-sidebar">
|
|
|
|
<i class="fa-solid fa-bars"></i>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
</script>
|
2023-10-09 22:47:58 +00:00
|
|
|
</body>
|
|
|
|
|
2023-10-28 15:58:36 +00:00
|
|
|
</html>
|