Skip to content

Commit

Permalink
Updated the OpenAI model selection for Chat Completions to be `gpt-4o…
Browse files Browse the repository at this point in the history
…`, `gpt-4-turbo`, and `gpt-3.5-turbo`.
  • Loading branch information
barthc authored and claygriffiths committed Jun 26, 2024
1 parent 134d539 commit 82e38e4
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions class-gwiz-gf-openai.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,23 +261,14 @@ public function init() {
public function get_openai_models() {
$models = array(
'chat/completions' => array(
'gpt-3.5-turbo' => array(
'description' => __( 'The same model used by <a href="https://chat.openai.com" target="_blank">ChatGPT</a>.', 'gravityforms-openai' ),
),
'gpt-3.5-turbo-16k' => array(
'description' => __( 'Same capabilities as the standard gpt-3.5-turbo model but with 4x the context length.', 'gravityforms-openai' ),
),
'gpt-4' => array(
'description' => __( 'More capable than any GPT-3.5 model, able to do more complex tasks, and optimized for chat. Will be updated with the latest model iteration.', 'gravityforms-openai' ),
),
'gpt-4-32k' => array(
'description' => __( 'Same capabilities as the base gpt-4 mode but with 4x the context length. Will be updated with the latest model iteration.', 'gravityforms-openai' ),
'gpt-4o' => array(

Check warning on line 264 in class-gwiz-gf-openai.php

View workflow job for this annotation

GitHub Actions / PHPCS

Array double arrow not aligned correctly; expected 8 space(s) between "'gpt-4o'" and double arrow, but found 13.
'description' => __( 'OpenAI\'s fastest and most affordable flagship model. Context length: 128k. <a href="https://platform.openai.com/docs/models/gpt-4o" target="_blank">More Details</a>', 'gravityforms-openai' ),
),
'gpt-4-1106-preview' => array(
'description' => __( 'The latest GPT-4 model with improved instruction following, JSON mode, reproducible outputs, parallel function calling, and more. Returns a maximum of 4,096 output tokens.', 'gravityforms-openai' ),
'gpt-4-turbo' => array(

Check warning on line 267 in class-gwiz-gf-openai.php

View workflow job for this annotation

GitHub Actions / PHPCS

Array double arrow not aligned correctly; expected 3 space(s) between "'gpt-4-turbo'" and double arrow, but found 1.
'description' => __( 'OpenAI\'s previous high-intelligence model. Context length: 128k. <a href="https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4" target="_blank">More Details</a>', 'gravityforms-openai' ),
),
'gpt-4o' => array(
'description' => __( 'The newest flagship model that provides GPT-4-level intelligence but is much faster and improves on its capabilities across text, voice, and vision.', 'gravityforms-openai' ),
'gpt-3.5-turbo' => array(

Check warning on line 270 in class-gwiz-gf-openai.php

View workflow job for this annotation

GitHub Actions / PHPCS

Array double arrow not aligned correctly; expected 1 space(s) between "'gpt-3.5-turbo'" and double arrow, but found 7.
'description' => __( 'Inexpensive model for simple tasks. Context length: 16k. <a href="https://platform.openai.com/docs/models/gpt-3-5-turbo" target="_blank">More Details</a>', 'gravityforms-openai' ),
),
),
'moderations' => array(
Expand Down

0 comments on commit 82e38e4

Please sign in to comment.