PHP code example of mano-code / ai-roles
1. Go to this page and download the library: Download mano-code/ai-roles library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mano-code / ai-roles example snippets
use ManoCode\Library\QwenChat;
$options = [
'model' => 'qwen-max',//模型名称
'params' => ['key' => 'value'],//自定义参数
'isJson' => true //是否返回json格式数据
];
$qwenChat = new QwenChat();
$response = $qwenChat->sendMessage('Hello, World!', 'This is a system prompt.', $options);