Skip to content

Update plugin name and addon title. #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion class-gwiz-gf-openai.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
protected $_full_path = __FILE__;
protected $_slug = 'gravityforms-openai';
protected $_title = 'Gravity Forms OpenAI';
protected $_short_title = 'OpenAI';
protected $_short_title = 'OpenAI (Free)';

/**
* Defines the capabilities needed for the Add-On.
Expand Down Expand Up @@ -261,16 +261,16 @@
public function get_openai_models() {
$models = array(
'chat/completions' => array(
'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-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-mini' => 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 3 space(s) between "'gpt-4o-mini'" and double arrow, but found 1.
'description' => __( 'OpenAI\'s most cost-efficient small model. Context length: 128k. <a href="https://platform.openai.com/docs/models/gpt-4o-mini" target="_blank">More Details</a>', 'gravityforms-openai' ),
),
'gpt-3.5-turbo' => array(

Check warning on line 273 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' ),
),
),
Expand Down Expand Up @@ -1383,7 +1383,7 @@

$body = apply_filters( 'gf_openai_request_body', $body, $endpoint, $feed );

$this->log_debug( __METHOD__ . '(): ' . sprintf( __( 'Making request to %s', 'gravityforms-openai' ), $url ) );

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

View workflow job for this annotation

GitHub Actions / PHPCS

A gettext call containing placeholders was found, but was not accompanied by a "translators:" comment on the line above to clarify the meaning of the placeholders.

// Cache successful responses.
$response = wp_remote_post($url, array_merge( array(
Expand Down Expand Up @@ -1544,7 +1544,7 @@
public function should_transform_feed( $feed ) {
$endpoint = rgars( $feed, 'meta/endpoint' );

if ( in_array( $endpoint, array( 'completions', 'edits' ) ) ) {

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

View workflow job for this annotation

GitHub Actions / PHPCS

Not using strict comparison for in_array; supply true for third argument.
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion gravityforms-openai.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Plugin Name: Gravity Forms OpenAI
* Plugin Name: Gravity Forms OpenAI (Free)
* Description: Pair the magic of OpenAI's robust models with Gravity Forms' flexibility.
* Plugin URI: https://gravitywiz.com/gravity-forms-openai/
* Version: 1.0-beta-1.13
Expand Down
Loading