You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a school project to test the differences in content created by GPT-3 vs. 4, but to get the quantity for testing, I need to run a script that creates the content for me and saves it to a JSON file. But it doesn't seem like GPT-4 is handling big requests very well.
When I try to get a request from OpenAI with GPT-4, it seems to timeout even when I've increased the timeout 600 seconds.
I get "null" on the content, and oftentimes I also get "null" on the error message.
The few times I was able to produce an error message, I got "502 cf_bad_gateway".
To Reproduce
The title and the outline are generated by OpenAI with GPT-4 before this final request is made.
I run the below code with the following parameters:
keyword = expensive champagne
title = The Ultimate Guide to the Top 10 Most Expensive Champagnes: Is It Worth the Splurge?
outline = 1. Introduction to Expensive Champagne
1.1 - The allure of luxury champagne
1.2 - The role of expensive champagne in celebrations and special events
Factors Contributing to the High Price of Champagne
2.1 - Production process and limited availability
2.2 - Prestigious brand reputation
2.3 - Aging and maturation
Top Expensive Champagne Brands
3.1 - Dom Pérignon
3.2 - Krug
3.3 - Louis Roederer Cristal
3.4 - Armand de Brignac
3.5 - Moët & Chandon
The Taste of Luxury: What Sets Expensive Champagne Apart
4.1 - Flavor profile and complexity
4.2 - Fine bubbles and mouthfeel
4.3 - Pairing expensive champagne with food
The Role of Expensive Champagne in Popular Culture
5.1 - Iconic moments in movies and television
5.2 - Celebrity endorsements and collaborations
5.3 - Expensive champagne in music and lyrics
Investing in Expensive Champagne
6.1 - Collecting and storing champagne
6.2 - The potential for appreciation in value
6.3 - Risks and rewards of investing in champagne
The Experience: Sipping on Expensive Champagne
7.1 - Champagne etiquette and rituals
7.2 - Best glassware for enjoying luxury champagne
7.3 - Creating memorable moments with expensive champagne
Conclusion: The Enduring Appeal of Expensive Champagne
8.1 - The timeless nature of luxury
8.2 - The joy of indulging in life's finer pleasures
Code snippets
functionget_article_content($open_ai,$article_outline,$article_title,$keyword){$model='gpt-4';$retry=false;$content_chat_decoded=null;$error_message=null;do{$open_ai->setTimeout(300);$content_chat=$open_ai->chat(['model'=>$model,'messages'=>[["role"=>"system","content"=>"You're AI article writer and SEO expert, you write the most amazing content. Each article you write should contain the following: - The article should be at least 1500 words, ideally 2000 words in total. - Start the article with an introduction. The introduction should not have a heading."],["role"=>"user","content"=>"{$article_outline} Title: {$article_title} SEO keyword: {$keyword} Write the article:"],],'temperature'=>0.7,'max_tokens'=>4000,'frequency_penalty'=>0,'presence_penalty'=>0,]);$content_chat_decoded_raw=json_decode($content_chat);$content_chat_decoded=$content_chat_decoded_raw->choices[0]->message->content;// Check for any error in the responseif(isset($content_chat_decoded_raw->error)){$retry=true;$model='gpt-4-0314';// Store the error message$error_message=$content_chat_decoded_raw->error->message;}else{$retry=false;}}while($retry);return[$content_chat_decoded,$error_message];}// 3. Write out the article, keeping in mind to SEO optimize for the keywordlist($content_chat_decoded,$error_message)=get_article_content($open_ai,$article_outline,$article_title,$keyword);$article_content=$content_chat_decoded;
OS
Ubuntu 20
PHP version
PHP 7.1.1-1
Library version
openai v3.0.1
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm working on a school project to test the differences in content created by GPT-3 vs. 4, but to get the quantity for testing, I need to run a script that creates the content for me and saves it to a JSON file. But it doesn't seem like GPT-4 is handling big requests very well.
When I try to get a request from OpenAI with GPT-4, it seems to timeout even when I've increased the timeout 600 seconds.
I get "null" on the content, and oftentimes I also get "null" on the error message.
The few times I was able to produce an error message, I got "502 cf_bad_gateway".
To Reproduce
The title and the outline are generated by OpenAI with GPT-4 before this final request is made.
I run the below code with the following parameters:
keyword = expensive champagne
title = The Ultimate Guide to the Top 10 Most Expensive Champagnes: Is It Worth the Splurge?
outline = 1. Introduction to Expensive Champagne
1.1 - The allure of luxury champagne
1.2 - The role of expensive champagne in celebrations and special events
Factors Contributing to the High Price of Champagne
2.1 - Production process and limited availability
2.2 - Prestigious brand reputation
2.3 - Aging and maturation
Top Expensive Champagne Brands
3.1 - Dom Pérignon
3.2 - Krug
3.3 - Louis Roederer Cristal
3.4 - Armand de Brignac
3.5 - Moët & Chandon
The Taste of Luxury: What Sets Expensive Champagne Apart
4.1 - Flavor profile and complexity
4.2 - Fine bubbles and mouthfeel
4.3 - Pairing expensive champagne with food
The Role of Expensive Champagne in Popular Culture
5.1 - Iconic moments in movies and television
5.2 - Celebrity endorsements and collaborations
5.3 - Expensive champagne in music and lyrics
Investing in Expensive Champagne
6.1 - Collecting and storing champagne
6.2 - The potential for appreciation in value
6.3 - Risks and rewards of investing in champagne
The Experience: Sipping on Expensive Champagne
7.1 - Champagne etiquette and rituals
7.2 - Best glassware for enjoying luxury champagne
7.3 - Creating memorable moments with expensive champagne
Conclusion: The Enduring Appeal of Expensive Champagne
8.1 - The timeless nature of luxury
8.2 - The joy of indulging in life's finer pleasures
Code snippets
OS
Ubuntu 20
PHP version
PHP 7.1.1-1
Library version
openai v3.0.1
The text was updated successfully, but these errors were encountered: