初始化json-rpc文档项目
This commit is contained in:
87
zh-cn/ai_service.md
Normal file
87
zh-cn/ai_service.md
Normal file
@ -0,0 +1,87 @@
|
||||
# 🤖 AI 服务模块
|
||||
|
||||
## 🛠 服务接口列表
|
||||
|
||||
```php
|
||||
<?php
|
||||
/**
|
||||
* AI 服务接口契约
|
||||
* @author ykxiao <yk_9001@hotmail.com>
|
||||
* @since 2025/4/7
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\JsonRpc;
|
||||
|
||||
interface AiServiceInterface
|
||||
{
|
||||
/**
|
||||
* 🗣 AI 智能对话
|
||||
* @param array $params 对话参数 {
|
||||
* @type string $session_id 会话ID
|
||||
* @type string $user_input 用户输入
|
||||
* @type int $model_type 模型类型
|
||||
* }
|
||||
* @return void
|
||||
*/
|
||||
public function aiChatPost(array $params): void;
|
||||
|
||||
/**
|
||||
* 📜 获取AI对话历史记录
|
||||
* @param array $params 查询参数 {
|
||||
* @type string $user_id 用户ID
|
||||
* @type int $page 页码
|
||||
* @type int $page_size 每页数量
|
||||
* }
|
||||
* @return array {
|
||||
* @type array $list 对话记录列表
|
||||
* @type int $total 总记录数
|
||||
* }
|
||||
*/
|
||||
public function aiChatHistoryPost(array $params): array;
|
||||
|
||||
/**
|
||||
* 📑 智能合同风险分析
|
||||
* @param array $params 合同参数 {
|
||||
* @type string $contract_id 合同ID
|
||||
* @type string $file_url 合同文件URL
|
||||
* }
|
||||
* @return void
|
||||
*/
|
||||
public function aiContractRiskAnalysisPost(array $params): void;
|
||||
|
||||
/**
|
||||
* 🔍 获取合同风险分析结果
|
||||
* @param array $params 查询参数 {
|
||||
* @type string $task_id 分析任务ID
|
||||
* }
|
||||
* @return array {
|
||||
* @type int $risk_level 风险等级
|
||||
* @type array $risk_items 风险条目
|
||||
* }
|
||||
*/
|
||||
public function aiContractRiskAnalysisResultPost(array $params): array;
|
||||
|
||||
/**
|
||||
* 💾 生成数据库查询语句
|
||||
* @param array $params 生成参数 {
|
||||
* @type string $question 自然语言问题
|
||||
* @type string $db_schema 数据库结构
|
||||
* }
|
||||
* @return void
|
||||
*/
|
||||
public function aiQuerySqlPost(array $params): void;
|
||||
|
||||
/**
|
||||
* 🗑️ 删除AI对话记录
|
||||
* @param array $params 删除参数 {
|
||||
* @type string $record_id 记录ID
|
||||
* @type string $user_id 用户ID
|
||||
* }
|
||||
* @return void
|
||||
*/
|
||||
public function aiChatDelete(array $params): void;
|
||||
}
|
||||
```
|
Reference in New Issue
Block a user