innovination/chatgpt

a simple laravel package to communicate with chatgpt

Maintainers

Package info

github.com/viditgoyal3009/composer-chatgpt

pkg:composer/innovination/chatgpt

Statistics

Installs: 48

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2024-08-21 11:13 UTC

This package is auto-updated.

Last update: 2026-03-21 14:52:59 UTC


README

This Composer package allows you to chat with OpenAPI's Chatgpt API

Installation

To install this package, you can use Composer. Run the following command in your project directory:

composer require innovination/chatgpt

Usage

To use this package, follow these steps:

  1. Import the package into your PHP file:
use Innovination\Chatgpt;
  1. Add GPT keys to your .env file
GPT_API_KEY='your-api-key'
GPT_MODEL_NAME='your-preferred model (ex. gpt-3.5-turbo-0125)'
  1. Create an instance of the Chatgpt class:
$obj = new Chatgpt();
$audio_path = 'link to audio';
$transcription = $obj->audioToText($audio_path);
  1. Convert audio to text: