PHP Classes

ChatGPT

Recommend this page to a friend!

      PHP ChatGPT Client  >  All threads  >  ChatGPT  >  (Un) Subscribe thread alerts  
Subject:ChatGPT
Summary:Does not return a response
Messages:5
Author:Greg Wolfe
Date:2023-09-02 18:32:54
 

  1. ChatGPT   Reply   Report abuse  
Picture of Greg Wolfe Greg Wolfe - 2023-09-02 18:32:54
I downloaded the three php files and all all looks fine on the webpage. However, after typing a question, I receive no response from openai. I am not sure how to troubleshoot the problem. Any help would be much appreciated.. thanks.

  2. Re: ChatGPT   Reply   Report abuse  
Picture of Ahmed Abdulla Ahmed Abdulla - 2023-09-03 11:16:06 - In reply to message 1 from Greg Wolfe
Hi

You have to update $apiKey = "Enter the Key"; with your chatGPT API Key

and update

$prompt = $prompt."Please add the paragraph that the system will search within here.";


in chatbot.php

  3. Re: ChatGPT   Reply   Report abuse  
Picture of Ahmed Abdulla Ahmed Abdulla - 2023-09-03 11:16:08 - In reply to message 1 from Greg Wolfe
Hi

You have to update $apiKey = "Enter the Key"; with your chatGPT API Key

and update

$prompt = $prompt."Please add the paragraph that the system will search within here.";


in chatbot.php

  4. Re: ChatGPT   Reply   Report abuse  
Picture of Greg Wolfe Greg Wolfe - 2023-09-03 18:23:54 - In reply to message 3 from Ahmed Abdulla
Thank you. I do have my API key in the script within double quotes as follows:

$apiKey = "sk-......";


However, I am not clear on what you mean by "update" the following line:

$prompt = $prompt."Please add the paragraph that the system will search within here.";

Any clarification would be much appreciated!

  5. Re: ChatGPT   Reply   Report abuse  
Picture of Greg Wolfe Greg Wolfe - 2023-09-03 18:44:09 - In reply to message 4 from Greg Wolfe
I believe I found the problem.

I uncommented the following line:

echo 'Error: ' . curl_error($ch);

And, I see the error statement below:

Error: SSL certificate problem: unable to get local issuer certificate

My local machine does not have an updated cert. I can move this application to another machine/website which has a valid cert, unless you know of a workaround.

Many thanks!