Worrying advice Famous quotes Bot

Overview App

If you enter a concern, it will return quotes about it.

Prompt

Request
If you enter a problem, please return a quote that solves that problem.

Input Source

<!-- Worrying advice Famous quotes Bot -->
<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Worrying advice Famous quotes Bot</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      margin: 50px;
      background-color: #f7f7f7;
    }
    h1 {
      text-align: center;
      color: #333;
font-size:40px;
    }
    .input-section {
      text-align: center;
      margin-bottom: 20px;
    }
    .input-section input {
      padding: 10px;
      width: 300px;
      font-size: 16px;
      border-radius: 5px;
      border: 1px solid #ccc;
    }
    button {
      padding: 10px 20px;
      font-size: 16px;
      background-color: #333;
      color: white;
      border: none;
      cursor: pointer;
      border-radius: 5px;
      margin-top: 10px;
    }
    button:disabled {
      background-color: #999;
    }
    #answer-1729580529 {
      margin-top: 20px;
      padding: 15px;
      background-color: #fff;
      border: 1px solid #ccc;
      border-radius: 4px;
      font-style: italic;
      color: #555;
      text-align: left;
    }
  </style>
</head>
<body>

  <h1>Worrying advice Famous quotes Bot</h1>

  <div class="input-section">
    <input type="text" id="worryInput" placeholder="Enter your concerns or complaints" />
    <button type="button" id="button-1729580529">Show quotes</button>
  </div>

  <div id="answer-1729580529">Enter your concerns or complaints and press the “Show Quotes” button.</div>
  
  <script>
    (() => {
      const button = document.getElementById('button-1729580529');
      const answerDiv = document.getElementById('answer-1729580529');
      const worryInput = document.getElementById('worryInput');

      
  if (!button.hasAttribute('data-listener')) {
    button.addEventListener('click', async event => {
      button.disabled = true;
        

        const worry = worryInput.value.trim();
        if (!worry) {
          answerDiv.innerText = "悩みや不満を入力してください。";
          button.disabled = false;
          return;
        }

        answerDiv.innerText = "Generating quotes...";

        const serverAi = new ServerAI();
        const answer = await serverAi.getAnswerText('pQN3xxwpWqPEg9tFtN22at', '', `Please provide me with quotes in response to ${MY WORRY: ${WORRY}} with the name of the speaker. Please do not list quotes where the speaker is unknown.`);

        answerDiv.innerText = answer;
        button.disabled = false;
      });

    button.setAttribute('data-listener', 'true');
  }
    })();
  </script>

</body>
</html>