(input: {
readonly name?: string;
readonly mimeType: string;
readonly data: string;
readonly byteLength: number;
})
| 116 | }); |
| 117 | |
| 118 | const toolFile = (input: { |
| 119 | readonly name?: string; |
| 120 | readonly mimeType: string; |
| 121 | readonly data: string; |
| 122 | readonly byteLength: number; |
| 123 | }): ToolFileValue => ({ |
| 124 | _tag: "ToolFile", |
| 125 | ...(input.name ? { name: input.name } : {}), |
| 126 | mimeType: input.mimeType, |
| 127 | encoding: "base64", |
| 128 | data: input.data, |
| 129 | byteLength: input.byteLength, |
| 130 | }); |
| 131 | |
| 132 | /** Build an engine whose execute triggers one elicitation and returns the handler's result. */ |
| 133 | const makeElicitingEngine = ( |