Further enhance and add in an advanced chain-of-thought with my experimental reasoning called: "Incremental Recursive Thinking"

```
import g4f
from g4f.client import Client
import asyncio
import json

class AdvancedChatbot:
    def __init__(self, provider=g4f.Provider.Liaobots):
        """
        Initialize the chatbot with a specific provider
        """
        self.client = Client(provider=provider)
        self.conversation_history = []
        self.system_context = {
            "personality": "You are a helpful, witty, and knowledgeable AI assistant.",
            "tone": "Professional yet friendly",
            "interests": ["technology", "science", "philosophy"]
        }

    def format_system_message(self):
        """
        Create a dynamic system message based on the context
        """
        return f"""
        {self.system_context['personality']}
        Conversation Tone: {self.system_context['tone']}
        Key Interests: {', '.join(self.system_context['interests'])}
        
        Guidelines:
        - Provide concise and informative responses
        - Use appropriate humor when suitable
        - Draw connections between topics
        """

    def add_to_history(self, role, content):
        """
        Add messages to conversation history with a max limit
        """
        self.conversation_history.append({"role": role, "content": content})
        # Limit history to last 10 messages to prevent context overflow
        if len(self.conversation_history) > 10:
            self.conversation_history = self.conversation_history[-10:]

    def generate_response(self, user_message, stream=True):
        """
        Generate a response using the chatbot's context and history
        """
        # Prepare messages with system context and conversation history
        messages = [
            {"role": "system", "content": self.format_system_message()}
        ] + self.conversation_history + [
            {"role": "user", "content": user_message}
        ]

        try:
            # Create response using the client
            response = self.client.chat.completions.create(
                model="gpt-4o-2024-08-06",
                messages=messages,
                stream=stream
            )

            # Handle streaming or non-streaming response
            if stream:
                full_response = ""
                for chunk in response:
                    if chunk.choices[0].delta.content:
                        content = chunk.choices[0].delta.content
                        full_response += content
                        print(content, end="", flush=True)
                print()  # New line after streaming
                return full_response
            else:
                return response.choices[0].message.content

        except Exception as e:
            print(f"Error generating response: {e}")
            return "I'm having trouble generating a response right now."

    def interact(self):
        """
        Interactive chat loop
        """
        print("🤖 Advanced Chatbot: Hello! I'm ready to chat. Type 'exit' to end the conversation.")
        
        while True:
            try:
                user_input = input("You: ")
                
                if user_input.lower() == 'exit':
                    print("🤖 Goodbye! Thanks for chatting.")
                    break
                
                # Add user message to history
                self.add_to_history("user", user_input)
                
                print("🤖 ", end="")
                bot_response = self.generate_response(user_input)
                
                # Add bot response to history
                self.add_to_history("assistant", bot_response)
            
            except KeyboardInterrupt:
                print("\n🤖 Chat interrupted. Type 'exit' to quit.")
            except Exception as e:
                print(f"An unexpected error occurred: {e}")

    def change_context(self, **kwargs):
        """
        Dynamically update the chatbot's system context
        """
        for key, value in kwargs.items():
            if key in self.system_context:
                self.system_context[key] = value
        print("🤖 Chatbot context updated!")

def main():
    # Create an advanced chatbot instance
    chatbot = AdvancedChatbot()
    
    # Optional: Change context before starting
    chatbot.change_context(
        personality="You are a tech-savvy AI that loves explaining complex concepts simply",
        interests=["artificial intelligence", "quantum computing", "space exploration"]
    )
    
    # Start interactive chat
    chatbot.interact()

if __name__ == "__main__":
    main()