(chatId: string, msg: string)
| 277 | } |
| 278 | |
| 279 | streamErrorEvent(chatId: string, msg: string) { |
| 280 | if (msg.includes('401 Incorrect API key provided')) |
| 281 | msg = '401 Unauthorized – check your API key and ensure it has access to the requested model.' |
| 282 | const clientResponse = { |
| 283 | event: 'error', |
| 284 | data: msg |
| 285 | } |
| 286 | this.safeWrite(chatId, 'message:\ndata:' + JSON.stringify(clientResponse) + '\n\n') |
| 287 | } |
| 288 | |
| 289 | streamMetadataEvent(chatId: string, apiResponse: any) { |
| 290 | const metadataJson: any = {} |
no test coverage detected