Home / Widgets / Territory Rulebook Chatbot GPT
Duplicate Snippet

Embed Snippet on Your Site

Territory Rulebook Chatbot GPT

Territory Rulebook Chatbot GPT

Code Preview
html
<script defer src="https://openai-widget.web.app/ChatComponent.bundle.js"></script>
<script>
  document.addEventListener('DOMContentLoaded', function() {
    // Check if the chat container exists
    var chatContainer = document.getElementById('chat-container');
    // If the chat container doesn't exist, create it
    if (!chatContainer) {
      chatContainer = document.createElement('div');
      chatContainer.id = 'chat-container';
      document.body.appendChild(chatContainer);
    }
    // Initialize the Chat component
    if (window.ChatComponent) {
      ChatComponent.init('EMis9PRxa4ogbGIzYxW0','#chat-container');
    } else {
      console.error('ChatComponent is not available');
    }
  });
</script>

Comments

Add a Comment