Forum in maintenance, we will back soon 🙂
Notifications
Clear all
Search result for: oops something went wrong
# | Post Title | Result Info | Date | User | Forum |
RE: Problem running Youtube transscript form Hasans newsletter | 9 Relevance | 7 months ago | stavros | Prompt Engineering | |
"Sir, I have already updated the environment." "I have been trying to resolve an issue for the past 4 days and seeking help if possible. As we are supposed to be here to help each other, I would appreciate your assistance. I have tried repeating the same steps multiple times. Firstly, I ran the command to upgrade the environment from the terminal while having the code loaded in a folder. I have done this step about 30 times. Then, I ran the program after inserting the API and YouTube URL. I pressed "run python" from the command of the program (not from the terminal), but nothing happened. I have attached a screenshot again to show you that something is wrong. To start a new file, I select the Python file option and add the text file code. Then, I add my API key and YouTube URL. Next, I run "pip install youtube-transcript-api" from the terminal to update the application environment. Before running the code, I must save it first. However, when I click on the "run Python file" button, I don't see any transcript in the terminal. I have been asking for help for many days and I'm wondering if there's something wrong with my setup. I am asking for your help and suggestions on what else I can do to resolve this issue. I feel stuck and need your assistance. Thank you." | |||||
RE: AI Chatbot on WordPress in 5 Minutes doesn't work for me | 8 Relevance | 5 months ago | Tech Biason | WordPress | |
Opps!! something went wrong. And it is also showing offline status rather than online. Please help @admin | |||||
RE: AI Tools How To Get different Json Response other than titles | 8 Relevance | 6 months ago | ndam | Online Tools Development | |
@husein please help me change this api from openai to google i waish to uase the free google api key instead thanks function openai_generate_text() { // Get the topic from the AJAX request $prompt = $_POST['prompt']; // OpenAI API URL and key $api_url = 'https://api.openai.com/v1/chat/completions'; $api_key = 'sk-XXX'; // Replace with your actual OpenAI API key // Headers for the OpenAI API $headers = [ 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $api_key ]; // Body for the OpenAI API $body = [ 'model' => 'gpt-3.5-turbo', 'messages' => [['role' => 'user', 'content' => $prompt]], 'temperature' => 0.7 ]; // Args for the WordPress HTTP API $args = [ 'method' => 'POST', 'headers' => $headers, 'body' => json_encode($body), 'timeout' => 120 ]; // Send the request $response = wp_remote_request($api_url, $args); // Handle the response if (is_wp_error($response)) { $error_message = $response->get_error_message(); wp_send_json_error("Something went wrong: $error_message"); } else { $body = wp_remote_retrieve_body($response); $data = json_decode($body, true); if (json_last_error() !== JSON_ERROR_NONE) { wp_send_json_error('Invalid JSON in API response'); } elseif (!isset($data['choices'])) { wp_send_json_error('API request failed. Response: ' . $body); } else { wp_send_json_success($data); } } // Always die in functions echoing AJAX content wp_die(); } add_action('wp_ajax_openai_generate_text', 'openai_generate_text'); add_action('wp_ajax_nopriv_openai_generate_text', 'openai_generate_text'); | |||||
RE: AI Tools How To Get different Json Response other than titles | 8 Relevance | 6 months ago | ndam | Online Tools Development | |
@admin i am using but Google API key how can i point this code to use it thanks function openai_generate_text() { // Get the topic from the AJAX request $prompt = $_POST['prompt']; // OpenAI API URL and key $api_url = 'https://api.openai.com/v1/chat/completions'; $api_key = 'sk-XXX'; // Replace with your actual OpenAI API key // Headers for the OpenAI API $headers = [ 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $api_key ]; // Body for the OpenAI API $body = [ 'model' => 'gpt-3.5-turbo', 'messages' => [['role' => 'user', 'content' => $prompt]], 'temperature' => 0.7 ]; // Args for the WordPress HTTP API $args = [ 'method' => 'POST', 'headers' => $headers, 'body' => json_encode($body), 'timeout' => 120 ]; // Send the request $response = wp_remote_request($api_url, $args); // Handle the response if (is_wp_error($response)) { $error_message = $response->get_error_message(); wp_send_json_error("Something went wrong: $error_message"); } else { $body = wp_remote_retrieve_body($response); $data = json_decode($body, true); if (json_last_error() !== JSON_ERROR_NONE) { wp_send_json_error('Invalid JSON in API response'); } elseif (!isset($data['choices'])) { wp_send_json_error('API request failed. Response: ' . $body); } else { wp_send_json_success($data); } } // Always die in functions echoing AJAX content wp_die(); } add_action('wp_ajax_openai_generate_text', 'openai_generate_text'); add_action('wp_ajax_nopriv_openai_generate_text', 'openai_generate_text'); | |||||
An error occurred: undefined | 5 Relevance | 11 months ago | AG | Online Tools Development | |
Hello, some thing wrong with your code I am getting all the time "An error occurred: undefined" Tried changing function name, same results Some thing wrong with ajax its getting 400 (Bad Request) Any ideas?? Best | |||||
RE: Create Free AI Tools With WordPress and Gemini in 3 Minutes | 5 Relevance | 5 months ago | bibi | Online Tools Development | |
@husein Unfortunately all my attempts failed THIS a sample of what i replace in javascript imageContainer.innerHTML = '<img src="https://habibart.com/wp-content/uploads/2024/03/robot.jpg" alt="Error" style="max-width: 100%;">' i change all of them with robot.jpg is something wrong with my edit please help! | |||||
RE: Error Encountered While Trying to Use AI Content Creation Tool | 5 Relevance | 5 months ago | SSAdvisor | Online Tools Development | |
@dassa 45 MINUTES?! If your response isn't within a couple of minutes (actually I wanted to say seconds) then something is wrong. Are you using the pro plan? | |||||
RE: Implementing Youtube-Title-Generator-WP-UI in my AI tools. | 5 Relevance | 6 months ago | dibyendu | Online Tools Development | |
Hi, I configured. There's something wrong in my php code. Any way thanks for prompt response. | |||||
RE: Problems with Make.com workflow | 4 Relevance | 3 months ago | Daniel | Marketing Automation | |
@ssadvisor Hi That's what I did I went to change as you told me, I show it in the video, and in this last message I have shown it from scratch again, but it still doesn't work. Thanks for the attention and help. | |||||
RE: AI Tools With WordPress in 5 Minutes not working: string did not match the expected pattern | 8 Relevance | 4 months ago | Film Sound Academy | WordPress | |
I just followed the steps on the website/video. The only thing I changed was the API key For html/java <div id="text-generation-tool"> <input type="text" id="topic" placeholder="Your Topic..."> <button id="generate-button">Generate Story!</button> <div id="result-container" style="display: none;"> <div class="result-wrapper"> <div class="result-content"> <textarea id="result" readonly></textarea> </div> <div class="copy-button-container"> <button id="copy-button">Copy</button> </div> </div> </div> <div id="loading" class="loader" style="display: none;"></div> </div> <style> /* Basic styles for the text generation tool */ #text-generation-tool { width: 100%; max-width: 600px; margin: 0 auto; font-family: Arial, sans-serif; } #topic { width: 100%; padding: 15px; margin-bottom: 20px; font-size: 16px; border-radius: 5px; border: 1px solid #ddd; } #generate-button { display: block; width: 100%; padding: 15px; margin-bottom: 20px; font-size: 16px; border: none; border-radius: 5px; color: #fff; background-color: #3498db; cursor: pointer; transition: background-color 0.3s ease; } #generate-button:hover { background-color: #2980b9; } #result-container { display: none; margin-bottom: 20px; } .result-wrapper { position: relative; overflow: hidden; } .result-content { display: flex; } #result { flex: 1; height: 400px; padding: 15px; font-size: 16px; border-radius: 5px; border: 1px solid #ddd; background-color: #f9f9f9; } .copy-button-container { margin-top: 10px; text-align: right; } #copy-button { padding: 8px 12px; font-size: 14px; border: none; border-radius: 5px; color: #fff; background-color: #3498db; cursor: pointer; transition: background-color 0.3s ease; } #copy-button:hover { background-color: #2980b9; } /* CSS for the loader */ .loader { display: block; margin: 50px auto; border: 16px solid #f3f3f3; /* Light grey */ border-top: 16px solid #3498db; /* Blue */ border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> <script> document.getElementById("generate-button").addEventListener("click", function(e){ e.preventDefault(); var generateButton = document.getElementById("generate-button"); if (generateButton.disabled) { return; // Prevent multiple clicks while content is being generated } generateButton.disabled = true; var topic = document.getElementById('topic').value; var prompt = "Generate a 3 sentence story about " + topic; var loading = document.getElementById('loading'); var result = document.getElementById('result'); var resultC = document.getElementById('result-container'); loading.style.display = 'block'; result.style.display = 'none'; // hide result textarea resultC.style.display = 'none'; var formData = new FormData(); formData.append('action', 'openai_generate_text'); formData.append('prompt', prompt); fetch('/wp-admin/admin-ajax.php', { method: 'POST', body: formData }) .then(response => response.json()) .then(data => { loading.style.display = 'none'; if(data.success) { result.value = data.data.choices[0].message.content; result.style.display = 'block'; // show result textarea resultC.style.display = 'block'; generateButton.disabled = false; } else { result.value = 'An error occurred: ' + data.data; result.style.display = 'block'; // show result textarea resultC.style.display = 'block'; generateButton.disabled = false; } }) .catch(error => { loading.style.display = 'none'; result.value = 'An error occurred: ' + error.message; result.style.display = 'block'; // show result textarea resultC.style.display = 'block'; generateButton.disabled = false; }); }); var copyButton = document.getElementById('copy-button'); copyButton.addEventListener('click', function() { var result = document.getElementById('result'); result.select(); document.execCommand('copy'); alert('Copied to clipboard!'); }); </script> For functions.php function openai_generate_text() { // Get the topic from the AJAX request $prompt = $_POST['prompt']; // OpenAI API URL and key $api_url = 'https://api.openai.com/v1/chat/completions'; $api_key = 'sk-XXX'; // Replace with your actual OpenAI API key // Headers for the OpenAI API $headers = [ 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $api_key ]; // Body for the OpenAI API $body = [ 'model' => 'gpt-3.5-turbo', 'messages' => [['role' => 'user', 'content' => $prompt]], 'temperature' => 0.7 ]; // Args for the WordPress HTTP API $args = [ 'method' => 'POST', 'headers' => $headers, 'body' => json_encode($body), 'timeout' => 120 ]; // Send the request $response = wp_remote_request($api_url, $args); // Handle the response if (is_wp_error($response)) { $error_message = $response->get_error_message(); wp_send_json_error("Something went wrong: $error_message"); } else { $body = wp_remote_retrieve_body($response); $data = json_decode($body, true); if (json_last_error() !== JSON_ERROR_NONE) { wp_send_json_error('Invalid JSON in API response'); } elseif (!isset($data['choices'])) { wp_send_json_error('API request failed. Response: ' . $body); } else { wp_send_json_success($data); } } // Always die in functions echoing AJAX content wp_die(); } add_action('wp_ajax_openai_generate_text', 'openai_generate_text'); add_action('wp_ajax_nopriv_openai_generate_text', 'openai_generate_text'); | |||||
Problem running Youtube transscript form Hasans newsletter | 8 Relevance | 7 months ago | stavros | Prompt Engineering | |
Hi to everyone i could not run the script and I explained. 1. copy the entire code to the clipboard 2. open the visual editor and paste the code 3. in the #inputs field I add my unique API key and paste my YouTube URL ( see a screenshot from the Attachment : transcription.png visual editor ) When I went to the terminal and entered "python app.py", nothing happened (see screenshot). I then clicked the "run" button, but still nothing happened. What could be wrong? Do I need to add something else to the code like import transcript Somewhere? In the terminal's problem tab, I see the message 'Import YouTube transcript API could not be resolved' (see screenshot). Attachment : transcription_2.png I will be pleased if you can help me solve the problem or see the error and how to fix it and run it perfectly. I await your guidance | |||||
RE: Problem running Youtube transscript form Hasans newsletter | 6 Relevance | 7 months ago | stavros | Prompt Engineering | |
Hi first of all thanks for your answer, What I did 1. Run the command pip install youtube-transcript-api in terminal first and I see the message from terminal [notice] A new release of pip is available: 23.2.1 -> 24.0[notice] To update, run python.exe -m pip install --upgrade pip so I run the updated version Attachment : transcription_10.png after I run the new command in the terminal "updated" version I see the following Attachment : transcription_11.png After replacing the API and also my YouTube URL and clicking on the run button, nothing happens in the terminal. I don't understand what went wrong. Please provide me with some help to do it again maybe is my fault I don't know that's why I keep insisting | |||||
RE: Starting out | 4 Relevance | 10 months ago | Husein Aboul Hasan | Online Business Strategies | |
Hello @willow, you have stated a lot of questions that it got a little confusing. According to building an income stream, a good approach can be learning a high-demand skill. You can learn web development, however in my opinion i think learning something AI-related might be more beneficial and more in demand so you might get a better opportunity. According to your business, you can build a website and start writing blog posts and repurposing them to other platforms to build an online presence. Inside your blogs and articles, you can provide some affiliate links which can be another income stream. In addition, make sure to collect as many emails as you can through your website, build an email list, and start email marketing. I dont know if that covered everything, feel free to ask to follow up questions if something still isnt covered. | |||||
RE: AI Chatbot on WordPress in 5 Minutes doesn't work for me | 4 Relevance | 4 months ago | CLARK DJILO | WordPress | |
Hello Hassan There is a bug on the bot. I installed the bot on my home page where I have my products When I installed the bot, everything went well on the desktop version but on the mobile version I am not more able to reach to my products from my homepage When I click, nothing happen , it is like the bot doesnt allow to acced to the products You can test this on the mobile version of your webite where your bot is installed Can you fix this please ? | |||||
RE: Story Generator | 4 Relevance | 5 months ago | Robert | WordPress | |
@husein I have tried. 40 years ago I used to write html. I went to college to try to write programs like using fortran and cobal but could never figure them out. For the first time in my life I am beggining to understand a bit with what you folks taught with Python - it is the first time in my life I have ever understood programming at all - THANK you. HTML I have not done in so long, I have forgotten most and of course all the changes but I am working on it and will also start learning css and javascript or at least try. Thank you for what I have learned so far. | |||||
Story Generator | 4 Relevance | 5 months ago | Robert | WordPress | |
I am so excited by what Hasan has done for us - amazing. I did the Story Generator and decided to customize it. I got it so it now writes in various lengths(though i cannot figure out how it went from writing 3 sentences to 3 words??? Anyway, I wanted to be able to post the results to one or more post categories and/or get a shortcode. I have tried and tried using chatgpt and I cannot figure it out, any ideas??? | |||||
RE: Create Free AI Tools With WordPress and Gemini in 3 Minutes | 4 Relevance | 5 months ago | bibi | Online Tools Development | |
@ssadvisor thank you for pointing to that I went and tried to make it active and click update but it goes back to not active status I got this message Snippet not activated, the following error was encountered: Unclosed '[' on line 121 what could be the problem? | |||||
RE: my_module not accessed Pylance | 4 Relevance | 1 year ago | Jacqueline Rogers | Python Scripting | |
@ssadvisor Hello, I went back over my steps and found the error. The syntax is everything! | |||||
AutoGPT Issues in the script | 4 Relevance | 1 year ago | Jonatan Saraiva | Prompt Engineering | |
Attachment : Capture.PNG I went through the course. I created a topic here and it disappeared. I never got a response. The autogpt script is not working for me and I have no idea what the issue could be. | |||||
building a business vidoes | 4 Relevance | 1 year ago | ian | Online Business Strategies | |
Has anyone went through the videos from A-Z? Would like to know how things are going since it's from 2021. is it still relevant or no one reads blog contents anymore? Btw, I joined Telegram but there's no way to type and have a conversation with members. Advise? |