()
| 28 | }); |
| 29 | |
| 30 | async function getToolsExposedToLLM(): Promise<string[]> { |
| 31 | const exchanges = await openAiEndpoint.getExchanges(); |
| 32 | expect(exchanges.length).toBeGreaterThanOrEqual(1); |
| 33 | const tools = exchanges[exchanges.length - 1].request.tools ?? []; |
| 34 | return tools.flatMap((t) => |
| 35 | t.type === "function" && t.function?.name ? [t.function.name] : [] |
| 36 | ); |
| 37 | } |
| 38 | |
| 39 | async function getSystemMessageSentToLLM(): Promise<string> { |
| 40 | const exchanges = await openAiEndpoint.getExchanges(); |
no test coverage detected
searching dependent graphs…