tasabina / gpt-test-project
Test project to lear OpenAI API
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type: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: 2024-04-27 11:12:24 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 chat
to communicate with GPT-3. - Run in console
vendor/bin/gptdemo translate -l en
orvendor/bin/gptdemo translate --language en
to translate phrase to English language. - Run in console
vendor/bin/gptdemo translate -l fr
orvendor/bin/gptdemo translate --language fr
to translate phrase to Franch language. - Run in console
vendor/bin/gptdemo translate -l ru
orvendor/bin/gptdemo translate --language ru
to translate phrase to Russian language.