tqtqtqtq / welm
WeLM的API客户端 - PHP(非官方)
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/tqtqtqtq/welm
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
README
A fully open-source third-partied (non-official) PHP SDK for accessing the WeLM API.
Installation
To install the package, simply run the following command:
composer require tqtqtqtq/welm
Usage
Create your sampling index.php file with following codes:
<?php require __DIR__ . '/vendor/autoload.php'; use tqtqtqtq\WeLM\WeLM; $welm_api_key = getenv('YOUR_WELM_API_KEY_IN_ENVIRONMENT_VARS'); $welm = new WeLM($welm_api_key); $completions = $welm->completion([ 'model' => 'xl', 'prompt' => '测试', 'temperature' => 0.95, 'max_tokens' => 512, ]); var_dump($completions);
Contributing
Contributions not available yet...
Credits
License
This package is licensed under the MIT License - see the LICENSE file for details.