$20

A script that processes multiple prompts for ChatGPT, compatible with CSV files

I want this!

A script that processes multiple prompts for ChatGPT, compatible with CSV files

$20

Manage Multiple Requests with ChatGPT Using Our PHP Script.

This PHP script is designed to streamline your interactions with ChatGPT. It reads requests from a CSV file named "1.csv", submits them to ChatGPT using the API, and then records the responses into a second CSV file, "2.csv".

To get started, you'll need your OpenAI API key.

It functions similarly to GPT for Sheets™ and Docs™, but without the nuisance of the Google Sheets 400 error (exceeding maximum execution time). It offers quicker performance than Visual Basic Excel Macros, and unlike Excel, it doesn't suffer from freezing issues.

Furthermore, you need to create a file called "1.csv" in which each prompt is on a new line, and a blank file named "2.csv" for capturing the results. Make sure both files are in the UTF-8 format.

Last but not least, don't overlook the need for write access permissions. This enables PHP to write data into the "2.csv" file. You can easily set these permissions using 'Chown' and 'Chmod' commands. With all these in place, you're ready to handle multiple requests with ChatGPT more efficiently.

You'll receive the PHP source code in its original, unencoded form.

All crucial lines of code come with annotations for better understanding.

You have the flexibility to modify:

  • API key (line 4):

$apiKey = 'ENTER_YOUR_OPENAI_API_KEY_HERE';

  • GPT model (line 54):

'model' => "gpt-3.5-turbo",

  • Temperature / creativity (line 56):

'temperature' => 0.5,

  • Token limit (line 67):

'max_tokens' => 1000





I want this!
Size
3.12 KB
Copy product URL