- Issue created by @bogdog400
- Status changed to Closed: works as designed
almost 2 years ago 4:36pm 27 January 2023 - 🇮🇳India anup.sinha Bengaluru
Hi @bogdog400,
First of all, many thanks for trying it out. Looks like you are trying it out in your local Drupal setup where the base URL is not configured. I have provided relative path in the form href as Drupal will automatically append your base URL with the relative path. If you want to try it out in your local, you can set a local URL like "drupal10-local" to your site using virtual host config in Apache. Please follow the step below -
Link Broken Issue:
1. open this file - wamp3.2\bin\apache\apache2.4.51\conf\extra\httpd-vhosts.conf
2. Add a virtual host for your Drupal 10 site like this. I have the exact sub folder D10 setup which you are referring in my local.
ServerName drupal10-local
ServerAlias www.drupal10-local
DocumentRoot "${INSTALL_DIR}/www/drupal10dev/web"
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
3. Now your ChatGPT link will come as - http://drupal10-local/chatgpt/search_form and it will work. PFA the screenshot from my local setup.
I hope this answer your query as we should not use full URL in form href.
API Error:
PFA ChatGPT_API_Config.png to know how your API configuration should look like. Endpoint should be - https://api.openai.com/v1/completions. Also if you want to enable SSL for cURL call, please go through the "*** Important Info" part in the module description page - https://www.drupal.org/project/chatgpt_plugin → . ChatGPT will not allow you make cURL call if it's not a secure connection.I hope with these two explanations you are able to run the plugin in your local setup. Please send me your API config details if you are still having issues (remove the access token part while sending.)
Thanks & Regards,
Anup - 🇺🇸United States bogdog400
Wow. Thanks for a detailed write up. I'll try this tomorrow (or maybe Monday.)
Hello Anup,
I have install Drupal 9 with xampp (localy) but when I try to open ChatGPT Content Generator I go to a page "404 Not Found", with the following mensage:
Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/8.2.0 Server at localhost Port 8080
The botton as the following path: http://localhost:8080/chatgpt/search_form/body
If I try to open the path http://localhost:8080/drupal/chatgpt/search_form/body I can access to chatgpt and generate some content.
Could you please help me?
Thank you very much