* 基础聊天
(message: string)
| 135 | * 基础聊天 |
| 136 | */ |
| 137 | public async chat(message: string): Promise<string> { |
| 138 | this.ensureLLMAvailable(); |
| 139 | |
| 140 | this.log(`发送消息: ${message.substring(0, 50)}...`); |
| 141 | const response = await this.llm!.sendMessage(message); |
| 142 | this.log(`收到回复: ${response.substring(0, 50)}...`); |
| 143 | return response; |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * 多轮对话 |
no test coverage detected