This project is a PHP command-line tool based on Symfony Console. It allows you to analyze text or images to generate tags or descriptions using a large language model (LLM). The features are as follows:
- text-to-tags: Analyze a text to generate a list of tags.
- pictures-to-tags: Analyze one or more pictures to generate a list of tags.
- text-to-description: Analyze a text to generate a complete description.
- pictures-to-description: Analyze one or more pictures to generate a complete description.
- PHP 7.4 or higher
- Composer
- An account and API key for a large language model (LLM) service such as OpenAI.
-
Clone the project repository:
git clone https://github.com/acseo/eshop-ai-tools cd eshop-ai-tools
-
Install the dependencies using Composer:
composer install
-
text-to-tags
Analyze a text to generate tags.
php bin/console text-to-tags "Your text here" --apiKey="your_api_key"
Options:
--baseUri
: Specify the LLM API endpoint (default isapi.openai.com/v1
).--apiKey
: API key for authentication.--existingTags
: List of existing tags that can be used.--locale
: Language to use (default isen_US
).
-
pictures-to-tags
Analyze one or more pictures to generate tags.
php bin/console pictures-to-tags image1.jpg image2.png --apiKey="your_api_key"
Similar options as
text-to-tags
. -
text-to-description
Analyze a text to generate a complete description.
php bin/console text-to-description "Your text here" --apiKey="your_api_key"
Similar options as
text-to-tags
. -
pictures-to-description
Analyze one or more pictures to generate a complete description.
php bin/console pictures-to-description image1.jpg image2.png --apiKey="your_api_key"
Similar options as
text-to-tags
. -
pictures-to-product
Analyze a picture and tranform it to a product
php bin/console pictures-to-product prodcut.jpg --apiKey="your_api_key"
Similar options as
text-to-tags
.
You can configure default options such as baseUri
and locale
directly in the code or via environment variables.
This project was developed by the ACSEO team.
This project is licensed under the MIT License.