tasabina / gpt-test-project
Test project to lear OpenAI API
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
pkg:composer/tasabina/gpt-test-project
Requires
- php: ^8.1
- symfony/console: ^6.2
- symfony/dotenv: ^6.2
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-10-27 14:46:50 UTC
README
A small test project for working with OpenAI. It has two commands for chat and text translation. The text for this description was translated using OpenAI from Russian to English.
How to install
Run this composer command
composer require tasabina/gpt-test-project
Insert new environment variables to your .env file.
GPT_SECRET_KEY=YOUR_OPENAI_API_KEY
DEV_ENV=0
Usage
- Run in console
vendor/bin/gptdemo chatto communicate with GPT-3. - Run in console
vendor/bin/gptdemo translate -l enorvendor/bin/gptdemo translate --language ento translate phrase to English language. - Run in console
vendor/bin/gptdemo translate -l frorvendor/bin/gptdemo translate --language frto translate phrase to Franch language. - Run in console
vendor/bin/gptdemo translate -l ruorvendor/bin/gptdemo translate --language ruto translate phrase to Russian language.