|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @remark :
|
|
|
|
* @name :AiCommandService.php
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/5/26 17:01
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Services;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :AI指令返回数据
|
|
|
|
* @name :AiCommandService
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/5/26 17:01
|
|
|
|
* Class AiCommandService
|
|
|
|
* @package App\Services
|
|
|
|
*/
|
|
|
|
class AiCommandService
|
|
|
|
{
|
|
...
|
...
|
@@ -22,16 +11,22 @@ class AiCommandService |
|
|
|
|
|
|
|
public $api_key = 'nnLsyr3IhPNsJt5OvTtD9SVCLEixMntg';
|
|
|
|
|
|
|
|
public $model = 'gemini-2.0-flash-lite';
|
|
|
|
/**
|
|
|
|
* @var string gemini 模型
|
|
|
|
* https://gemini.google.com/app
|
|
|
|
* gemini-2.0-flash-lite
|
|
|
|
* gemini-2.5-pro-preview-05-06
|
|
|
|
* gemini-2.5-flash-preview-05-20
|
|
|
|
* gemini-2.5-flash-preview-04-17
|
|
|
|
*/
|
|
|
|
public $model = 'gemini-2.5-pro-preview-05-06';
|
|
|
|
|
|
|
|
public $supplier = 'google';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :Ai一键排版
|
|
|
|
* @name :ai_click_layout
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/5/26 17:03
|
|
|
|
* AI排版
|
|
|
|
* @param $content
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function send_layout_design($content){
|
|
|
|
$param = [
|
...
|
...
|
|