Further enhance and add in an advanced in-depth system instruction with advanced few_shot cot.

```
import g4f
from g4f.client import Client
import time
import sys
import json
from typing import List, Dict
import random
from datetime import datetime

client = Client(provider=g4f.Provider.Blackbox)

class AdvancedChatbot:
    def __init__(self):
        self.conversation_history: List[Dict] = []
        self.supported_models = [
            "gpt-4o-mini",
            "gpt-4o",
            "gemini-pro"
        ]
        self.current_model = "gpt-4o-mini"
        self.system_prompt = """boom"""

    def save_conversation(self):
        """Save conversation history to a JSON file"""
        timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
        filename = f"conversation_{timestamp}.json"
        with open(filename, 'w') as f:
            json.dump({
                'model': self.current_model,
                'history': self.conversation_history
            }, f, indent=4)
        print(f"\nConversation saved to {filename}")

    def load_conversation(self, filename: str):
        """Load conversation history from a JSON file"""
        try:
            with open(filename, 'r') as f:
                data = json.load(f)
                self.conversation_history = data['history']
                self.current_model = data.get('model', self.current_model)
            print(f"Loaded conversation from {filename}")
        except FileNotFoundError:
            print("File not found!")
        except json.JSONDecodeError:
            print("Invalid JSON file!")

    def stream_response(self, response: str):
        """Stream the response with a typing effect"""
        for char in response:
            sys.stdout.write(char)
            sys.stdout.flush()
            time.sleep(random.uniform(0.01, 0.03))
        print()

    def get_response(self, user_input: str) -> str: # Indentation fixed
        """Get response from the AI model"""
        messages = [{"role": "system", "content": self.system_prompt}]
        messages.extend(self.conversation_history)
        messages.append({"role": "user", "content": user_input})

        try:
            response = client.chat.completions.create(
                model=self.current_model,
                messages=messages,
                stream=True
            )
            
            # Accumulate the streamed response
            full_response = ""
            for chunk in response:
                if chunk.choices[0].delta.content is not None:
                    full_response += chunk.choices[0].delta.content
                    
            return full_response

        except Exception as e:
            return f"Error: {str(e)}"

    def switch_model(self, model_name: str):
        """Switch the AI model"""
        if model_name in self.supported_models:
            self.current_model = model_name
            return f"Switched to {model_name}"
        return f"Model not supported. Available models: {', '.join(self.supported_models)}"

    def clear_history(self):
        """Clear conversation history"""
        self.conversation_history = []
        return "Conversation history cleared."

    def run(self):
        """Main chat loop"""
        print("Advanced AI Chatbot")
        print("==================")
        print("Commands:")
        print("/switch <model> - Switch AI model")
        print("/save - Save conversation")
        print("/load <filename> - Load conversation")
        print("/clear - Clear conversation history")
        print("/history - Show conversation history")
        print("/quit - Exit chatbot")
        print("==================")

        while True:
            try:
                user_input = input("\nYou: ").strip()

                # Handle commands
                if user_input.startswith('/'):
                    if user_input == '/quit':
                        break
                    elif user_input.startswith('/switch '):
                        model = user_input.split(' ')[1]
                        print(self.switch_model(model))
                    elif user_input == '/save':
                        self.save_conversation()
                    elif user_input.startswith('/load '):
                        filename = user_input.split(' ')[1] # Fixed indentation
                        self.load_conversation(filename)
                    elif user_input == '/clear':
                        print(self.clear_history())
                    elif user_input == '/history':
                        for message in self.conversation_history:
                            print(message['content'])
                    else:
                        print("Invalid command!")
                else:
                    response = self.get_response(user_input)
                    self.conversation_history.append({"role": "assistant", "content": response})
                    self.stream_response(response)

            except KeyboardInterrupt:
                print("\nExiting chatbot...")
                break

if __name__ == "__main__":
    chatbot = AdvancedChatbot()
    chatbot.run()