<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport"…
- User
<!-- Main Chat Area --> <main class="flex-1 flex flex-col bg-[#343541] overflow-hidden"> <div id="chat-messages" class="flex-1 overflow-y-auto p-4"></div> <!-- Input and Model Selection --> <div class="w-full p-4 border-t border-white/20 bg-[#343541]"> <div class="max-w-3xl mx-auto"> <div class="flex items-center justify-between mb-3"> <div class="relative"> <button id="toggle-model" class="model-toggle"> <span id="model-label">1o-mini</span> <svg class="h-4 w-4 text-gray-400 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg> </button> <div id="model-list" class="model-list hidden"> <div data-model="1o-mini">1o-mini</div> </div> </div> </div> <form id="chat-form" class="relative"> <textarea id="user-input" class="w-full border rounded-lg p-3 pr-20 focus:outline-none focus:ring-2 focus:ring-[#10a37f]" placeholder="Send a message" rows="1"></textarea> <label for="image-upload" class="image-upload-button absolute right-12 bottom-3"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"></path> </svg> </label> <input type="file" id="image-upload" accept="image/*" class="hidden"> <button type="submit" class="send-button text-white absolute right-3 bottom-4"> <svg fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg> </button> </form> <div id="uploaded-image-container"></div> <p class="text-xs text-center mt-2 text-gray-400">ChatGPT can make mistakes. Consider checking important information.</p> </div> </div> </main>let currentModel = '1o-mini'; let isPlus = false; let conversations = JSON.parse(localStorage.getItem('conversations')) || []; let currentConversationId = null; let uploadedImage = null; function addMessage(content, isUser = false) { const messageDiv = document.createElement('div'); messageDiv.className = `message-bubble ${isUser ? 'user-message' : 'gpt-message'}`; applyHighlight(messageDiv); const avatar = document.createElement('img'); avatar.className = 'avatar'; avatar.src = isUser ? 'https://ui-avatars.com/api/?name=User&background=random' : 'https://i.pinimg.com/736x/7a/da/0f/7ada0f01f2d02496cf16d0161f9c9b23.jpg'; avatar.alt = isUser ? 'User Avatar' : 'ChatGPT Avatar'; const innerDiv = document.createElement('div'); innerDiv.className = 'flex-1'; const formattedContent = processContent(content); innerDiv.innerHTML = formattedContent; messageDiv.appendChild(avatar); messageDiv.appendChild(innerDiv); chatMessages.appendChild(messageDiv); chatMessages.scrollTop = chatMessages.scrollHeight; messageDiv.querySelectorAll('pre code').forEach((block) => { hljs.highlightBlock(block); applyHighlight(messageDiv); }); if (currentConversationId !== null) { const conversation = conversations.find(c => c.id === currentConversationId); if (conversation) { conversation.messages.push({ content, isUser }); saveConversations(); } } } function processContent(content) { // Substituir marcadores de negrito content = content.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>'); // Substituir marcadores de código inline content = content.replace(/`([^`]+)`/g, '<code>$1</code>'); // Substituir blocos de código content = content.replace(/```(\w+)?\n([\s\S]*?)```/g, function(match, language, code) { // Escape HTML entities in the code code = code.replace(/&/g, '&') .replace(/</g, '<') .replace(/>/g, '>') .replace(/"/g, '"') .replace(/'/g, '''); // Para HTML, usamos 'language-html' em vez de 'language-' const languageClass = language === 'html' ? 'language-html' : (language ? `language-${language}` : ''); return `<pre><code class="${languageClass}">${code.trim()}</code></pre>`; }); // Substituir quebras de linha content = content.replace(/\n/g, '<br>'); return content; - Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.