• WordPress Chatbot

    Posted by Paul Singh on December 26, 2024 at 10:47 pm

    Hi Guys,

    I was having an issue trying to load the chatbot that Hasan had created a video on, but for some reason the code seems to be a little different from the video and not sure if everything works properly or I am doing something wrong.

    Can anyone assist.

    Hasan replied 1 month, 4 weeks ago 4 Members · 25 Replies
  • 25 Replies
  • Hasan

    Administrator
    December 27, 2024 at 8:42 am

    Hi Paul, can you please share more details about the problem and which video you are referring to?

  • Paul Singh

    Member
    December 27, 2024 at 5:47 pm

    So I was trying out the chatbot with the ability to add AI tomato the chatbot mire robust. Then I saw your RAG chatbot which I was going to try but got a little confused which would actually work best for me. So the current problem is as follows.

    I added the code snippets and tries to load it to just a new page to test things out and here is what I get.

  • Husein

    Administrator
    December 27, 2024 at 6:45 pm

    The first code snippet is a javascript code so make sure to write <script> on the first line before everything and </script> on the last line after everything.

  • Paul Singh

    Member
    December 27, 2024 at 9:39 pm

    Thank you for the input. I think the problem could be a bit bigger than I initially though but determined to figure this out. The first thing I did was try and test the bot out and noticed it was offline, so I changed line 93 to 1 to have the bot active but it still has not activated so I cannot test if it is actually working before I create the snippets.

    I have gone ahead to see if by adding the snippets if they work on my site but noticed that the integration worked correctly but the bot is not online.

    Hasan do you know what I could have dont incorrectly?

    I guess once I get this sorted I will see how I can integrate RAG or ChatGPT to answer potential questions.

    • Husein

      Administrator
      December 28, 2024 at 6:52 am

      Did you edit everything in your code as Hasan mentioned in the tutorial like putting your own OpenAI API key, your site URL in the javascript variables, activated the PHP snippets when updating them, and so on?

      • Paul Singh

        Member
        December 29, 2024 at 1:27 am

        Hi Husein,

        I am a newbie but Im pretty sure I got all of the code in correctly. I added the code snippet from the config.php file and made sure I selected php.

        I then added the other three files and made sure I added <script> and </script> when adding the script file and <style> and </style> to the style file.

        <font face=”inherit”>I also </font>changed<font face=”inherit”> the ‘botstatus’ to 1 to </font>activate<font face=”inherit”> but for some reason the bot is not </font>surfing<font face=”inherit”> active nor do the buttons populate at the bottom of the chat for quick reference. </font>

        <font face=”inherit”>Obviously I am doing something wrong. lol </font>

        • Husein

          Administrator
          December 29, 2024 at 8:20 am

          Please dont share your API keys like this, people would use them and ud pay for every call, so make sure to deactivate this key and generate a new one.
          Anyways attach all your codes so that i can test them from my side and see whats wrong.

          • Paul Singh

            Member
            December 30, 2024 at 8:46 pm

            Hi Husein,

            Attached are the codes I have loaded for the front end. I hope this is what you were asking for.

            This file was truncated for preview. Please download to view the full file.
            • Paul Singh

              Member
              December 31, 2024 at 5:00 pm

              Hi Husein

              I received a post with front and back end codes but cannot see where is has been uploaded for me to download.

            • Husein

              Administrator
              January 1, 2025 at 4:51 pm

              I uploaded them but they didnt open correctly, i don’t know why so i deleted it.

              Please attach your email so that i can send them by email.

            • Paul Singh

              Member
              January 1, 2025 at 6:07 pm

              Hi Husein

              My email is pssawhney@yahoo.com.

            • Husein

              Administrator
              January 3, 2025 at 6:47 am

              I sent you the codes by email, make sure to try them out and if you face any problems; ask here.

  • Gerhard Liebenberg

    Member
    December 28, 2024 at 7:01 pm

    Hi Guys, I am also looking for the RAG code that was said to be included in a newsletter (according to this article: https://learnwithhasan.com/blog/free-ai-chatbot-on-wordpress/)

    • Paul Singh

      Member
      December 29, 2024 at 1:32 am

      I think these are in the description of the video:

      UI 👉https://tinyurl.com/25xpyvj5

      Backend 👉 https://tinyurl.com/yrvchzsn

    • Husein

      Administrator
      December 29, 2024 at 8:12 am

      Hasan still didnt publish yet publish the RAG integrated chatbot guide, when he does so it will be via newsletter so make sure to stay updated on the upcoming newsletters.

    • Hasan

      Administrator
      January 2, 2025 at 11:53 am

      I created a new project that uses no code tools as backend for the RAG bot on wordpress, you can check the video here:

      https://youtu.be/jKXbm1zN4wk?si=7yBSVq1dSwzuK0Ai

      • This reply was modified 2 months ago by  Hasan.
      • Gerhard Liebenberg

        Member
        January 9, 2025 at 6:00 am

        Great, thank you Hasan.

        • Hasan

          Administrator
          January 9, 2025 at 6:58 am

          🙏

          • Gerhard Liebenberg

            Member
            January 11, 2025 at 9:56 pm

            Hi Hasan, I trust you are well.

            I am struggling with RelevanceAi.

            In one case, I literally copied the question from the csv data file, but the tool said that it could not find an answer.

            In another case, I removed a question from the csv file, but the tool still gave me the answer; and it also included unrelated answers from other records in the file.
            I can’t use this in a production application.

            What other options have you explored to query our RAG data?

            • Hasan

              Administrator
              January 12, 2025 at 4:07 am

              RelevanceAI is a good tool, are you sure you synced the records after updating, there is a button I think in the corner to handle this.

              yeah there are several options, depending on what you want, we can find something that is suitable for you.

              would you like a zero-code approach for example?

              Only WordPress? or for any website?

            • Gerhard Liebenberg

              Member
              January 12, 2025 at 8:21 am

              Hi Hasan. For any website preferably, WordPress included.

              I am a developer, so I don’t require no-code. I would actually prefer to have a bit more control over what the code is doing.

            • Gerhard Liebenberg

              Member
              January 12, 2025 at 8:31 am

              I synced the data. Here is the data and output.
              Why would the system say that we offer courses if it is not specified in the data? This would result in people getting wrong answers.

            • Hasan

              Administrator
              January 12, 2025 at 12:58 pm

              Just to make things clear, in RAG, it is not only the database of Q&A that decides the answers, it is the LLM model capabilities + data + prompts.
              and if you want to run RAG in production, it is not enough to connect a bunch of questions to an LLMM, you will need another later of verification if the answers are critical for you.

              anyway, coming back to RelevanceAI, try playing with the prompt, and see if the results changes, testing is crucial when setting up AI systems.

              and if you want full control over your system (which I prefer too 😅)

              maybe you should think about building this using Langchain Libraries, and maybe taking a look at guardrails may help you too if you want to create something stable and production ready.

              I don’t know how much critical your business is, and how much you want the answers to be accurate, maybe sharing more details will help me more point you in the right direction.

            • Gerhard Liebenberg

              Member
              January 12, 2025 at 1:41 pm

              Okay thank you Hasan. I will have a look at those.

            • Hasan

              Administrator
              January 13, 2025 at 4:23 am

              🙏

Log in to reply.