Title: API Model Configuration Not Working
Last modified: December 15, 2023

---

# API Model Configuration Not Working

 *  Resolved [sharkstack](https://wordpress.org/support/users/sharkstack/)
 * (@sharkstack)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/api-model-configuration-not-working/)
 *     ```wp-block-code
         $query->setModel( 'gpt-4' );
       ```
   
 * Using this to override the default engine, I get a 500 error. 
   The method breaks
   functionality that is restored by commenting out the line. Tried numerous syntactical
   approaches (e.g. gpt-3.4, gpt-3, turbo, etc. All break the code when code otherwise
   works if setModel() is commented out.
    -  This topic was modified 2 years, 5 months ago by [sharkstack](https://wordpress.org/support/users/sharkstack/).

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

 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/api-model-configuration-not-working/#post-17281803)
 * Hi,
 * Can you try **set_model** instead?
 *  [agile007](https://wordpress.org/support/users/agile007/)
 * (@agile007)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/api-model-configuration-not-working/#post-17286885)
 * No, replacing the documented function name setModel() with the function name 
   suggested (set_mode()) did not resolve the issue. The issue is not resolved.
   
   Including $_query_->_setModel_( ‘_text_–_davinci_–_003_‘ ); as documented breaks
   calls
 *  [agile007](https://wordpress.org/support/users/agile007/)
 * (@agile007)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/api-model-configuration-not-working/#post-17287127)
 * UPDATE: YES, replacing setModel() with set_model() in API calls DOES resolve 
   the issue. Earlier reply was based on preliminary testing.

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

The topic ‘API Model Configuration Not Working’ 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/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)

 * 3 replies
 * 3 participants
 * Last reply from: [agile007](https://wordpress.org/support/users/agile007/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/api-model-configuration-not-working/#post-17287127)
 * Status: resolved