gemy/chat-gpt-trans

using for chat-gpt translation

1.0.0 2024-02-18 08:12 UTC

This package is auto-updated.

Last update: 2024-09-18 09:19:47 UTC


README

Chat GPT Translation

Build Status Total Downloads Latest Stable Version License

Chat GPT Translation

Translation library using Chat-gpt

Installation

You can install the package via composer:

composer require gemy/chat-gpt-trans

Edit in env file

TRANS_KEY=your_chat_gpt_token

The code

use Gemy\ChatGptTrans\App\ChatGptTrans;

class HomeController extends Controller
{
    public function transText()
    {
         $string = "مساج الحجارة الساخنة والأعشاب";
         /// If you don`t need to save it in a file, write it like this
         $text = new ChatGptTrans('en',false);
         ////
          $text = new ChatGptTrans('en',true);
    }
}

If the response is null then there is an error