Title: PHP Error in chatbot
Last modified: November 16, 2023

---

# PHP Error in chatbot

 *  Resolved [alexschneider_ru](https://wordpress.org/support/users/alexschneider_ru/)
 * (@alexschneider_ru)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-error-in-chatbot/)
 * Hi,
   since some time ago I get an error message “Got an unexpected response from
   OpenAI. Check your PHP Error Logs. (OpenAI).” [https://c2n.me/4jLQnf2.png](https://c2n.me/4jLQnf2.png)
   Here are my php error log entries: [https://c2n.me/4jLQvr7.png](https://c2n.me/4jLQvr7.png)
   How do I fix the problem?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [alexschneider_ru](https://wordpress.org/support/users/alexschneider_ru/)
 * (@alexschneider_ru)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-error-in-chatbot/#post-17209267)
 * The error in php error log is:
 * > [17-Nov-2023 09:00:14 UTC] PHP Warning: Trying to access array offset on value
   > of type null in /*********/public_html/wp-content/plugins/ai-engine/classes/
   > engines/openai.php on line 478
   > [17-Nov-2023 09:00:14 UTC][17-Nov-2023 09:00:
   > 14 UTC] Got an unexpected response from OpenAI. Check your PHP Error Logs.
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-error-in-chatbot/#post-17209301)
 * Hi [@alexschneider_ru](https://wordpress.org/support/users/alexschneider_ru/),
 * I don’t see why you are getting this error; can you make sure you are using the
   latest version of AI Engine? Then, could you tell us which model you use, and
   how we could replicate what you are trying to do?
 *  Thread Starter [alexschneider_ru](https://wordpress.org/support/users/alexschneider_ru/)
 * (@alexschneider_ru)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-error-in-chatbot/#post-17209381)
 * I am using AI Engine v1.9.99.
 * Here is my settings:
    - [https://c2n.me/4jM875Q.png](https://c2n.me/4jM875Q.png)
    - [https://c2n.me/4jM89CE.png](https://c2n.me/4jM89CE.png)
 * I tried to change the model but the error remained the same.
 *  [insellup](https://wordpress.org/support/users/insellup/)
 * (@insellup)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-error-in-chatbot/#post-17209642)
 * Hello! I also started having this problem two days ago. What does this have to
   do with not only your plugin, but also other plugins for integration with OpenAi.
   I noticed that if the site is on Russian hosting, then there is no output from
   OpenAi at all, or the message “The model predicted completion…” is displayed.
   And even if, for example, you specify the wrong API key, then instead of the 
   displayed error “incorrect API key”, the result displays “The model predicted
   completion…” or is empty.
 * But if you install the site along with the plugin on a hosting that is not in
   Russia, then everything works fine. This problem suddenly appeared two days ago.
   The OpenAi account is paid and there are no restrictions for Russia.
 * Maybe you know what the problem might be?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP Error in chatbot’ is closed to new replies.

 * ![](https://ps.w.org/ai-engine/assets/icon-256x256.png?rev=3431928)
 * [AI Engine - The Chatbot, AI Framework & MCP for WordPress](https://wordpress.org/plugins/ai-engine/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ai-engine/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ai-engine/)
 * [Active Topics](https://wordpress.org/support/plugin/ai-engine/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ai-engine/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ai-engine/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [insellup](https://wordpress.org/support/users/insellup/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/php-error-in-chatbot/#post-17209642)
 * Status: resolved