-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 03, 2023 at 06:16 PM
-- Server version: 10.4.28-MariaDB
-- PHP Version: 8.2.4

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `db_chatgpt`
--

-- --------------------------------------------------------

--
-- Table structure for table `chats`
--

CREATE TABLE `chats` (
  `id` int(11) NOT NULL,
  `chat_id` varchar(50) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `sender` varchar(30) NOT NULL,
  `role` varchar(10) NOT NULL,
  `content` text NOT NULL,
  `prompt_tokens` int(10) UNSIGNED NOT NULL,
  `completion_tokens` int(10) UNSIGNED NOT NULL,
  `total_tokens` int(10) UNSIGNED NOT NULL,
  `is_success` tinyint(1) NOT NULL,
  `response_msg` text DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `config`
--

CREATE TABLE `config` (
  `id` int(11) NOT NULL,
  `baseurl` varchar(40) NOT NULL,
  `model` varchar(30) NOT NULL,
  `user_agent` varchar(50) NOT NULL,
  `max_tokens` int(11) NOT NULL,
  `check_nsfw` tinyint(1) DEFAULT NULL,
  `proxy` varchar(60) DEFAULT NULL,
  `identity_gpt4` varchar(200) DEFAULT NULL,
  `welcome_msg` text DEFAULT NULL,
  `histreset_msg` varchar(150) DEFAULT NULL,
  `histresetauto_msg` varchar(150) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `config`
--

INSERT INTO `config` (`id`, `baseurl`, `model`, `user_agent`, `max_tokens`, `check_nsfw`, `proxy`, `identity_gpt4`, `welcome_msg`, `histreset_msg`, `histresetauto_msg`) VALUES
(1, 'https://chatgpt.vulcanlabs.co', 'gpt-4', 'Chat GPT Android 2.8.3 290', 1000, 0, 'http://p.webshare.io:80:ztnarfps-rotate:ky9bed5j9a0b', 'You are an AI language used model gpt-4, created by OpenAI. GPT-4 is an improved version of ChatGPT.', '🤖 *Welcome to Bot ChatGPT-4* 🤖\r\n\r\n> You can just chat here and AI will respond to you...\r\n> To reset AI history just type *#reset*\r\n> That\'s all, have fun!!\r\n\r\nNote: be careful, this is still a test, there may be bugs.\r\n\r\n_Created By MRHRTZ_', '_✅ Success reset history_', '_⚠ Max token exceeded, chat history will be reset and a new session will be created_');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `chats`
--
ALTER TABLE `chats`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `config`
--
ALTER TABLE `config`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `chats`
--
ALTER TABLE `chats`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- AUTO_INCREMENT for table `config`
--
ALTER TABLE `config`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
