(request: string)
| 40 | return jsonPrintAgent; |
| 41 | |
| 42 | async function _handleMessage(request: string): Promise<Result<T>> { |
| 43 | const response = await _translator.translate(request); |
| 44 | if (response.success) { |
| 45 | console.log("Translation Succeeded! ✅\n") |
| 46 | console.log("JSON View") |
| 47 | console.log(JSON.stringify(response.data, undefined, 2)) |
| 48 | } |
| 49 | else { |
| 50 | console.log("Translation Failed ❌") |
| 51 | console.log(`Context: ${response.message}`) |
| 52 | } |
| 53 | return response; |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | interface MathAgent<T extends object> extends Agent<T> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…