Download the PHP package teariot/php-yandex-gpt without Composer
On this page you can find all versions of the php package teariot/php-yandex-gpt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download teariot/php-yandex-gpt
More information about teariot/php-yandex-gpt
Files in teariot/php-yandex-gpt
Package php-yandex-gpt
Short Description A PHP library for seamless interaction with Yandex GPT (Generative Pre-trained Transformer) API, providing text generation, tokenization, and embedding functionalities.
License MIT
Homepage https://github.com/TeaRiot/php-yandex-gpt
Informations about the package php-yandex-gpt
PHP Yandex GPT Library
This PHP library provides a convenient interface to interact with Yandex GPT (Generative Pre-trained Transformer) API for text generation, tokenization, and obtaining embeddings.
Installation
To install the library via Composer, use the following command:
Usage
Ensure you have obtained the necessary OAuth token and folder ID from Yandex GPT.
Text Completion
To generate text completions, use the complete
method:
Or you can use asynchronous text generation.
Enhanced Usage of complete
Method
This variation showcases an extended use case of the complete
method by incorporating system messages along with user messages.
Tokenization
For tokenizing text, utilize the tokenize
method:
Obtaining Embeddings
To obtain embeddings from text data, use the embedding
method:
Remember to replace 'YOUR_OAUTH_TOKEN'
and 'YOUR_FOLDER_ID'
with your actual credentials obtained from Yandex GPT.
For detailed information on available parameters and configurations, please refer to the library documentation or Yandex GPT API documentation.
License
This library is licensed under the MIT License - see the LICENSE file for details.
All versions of php-yandex-gpt with dependencies
ext-curl Version *
ext-mbstring Version *
ext-json Version *