(input: {
readonly name?: string;
readonly mimeType: string;
readonly data: string;
readonly byteLength: number;
})
| 181 | }); |
| 182 | |
| 183 | const toolFile = (input: { |
| 184 | readonly name?: string; |
| 185 | readonly mimeType: string; |
| 186 | readonly data: string; |
| 187 | readonly byteLength: number; |
| 188 | }): ToolFileValue => ({ |
| 189 | _tag: "ToolFile", |
| 190 | ...(input.name ? { name: input.name } : {}), |
| 191 | mimeType: input.mimeType, |
| 192 | encoding: "base64", |
| 193 | data: input.data, |
| 194 | byteLength: input.byteLength, |
| 195 | }); |
| 196 | |
| 197 | /** Build an engine whose execute triggers one elicitation and returns the handler's result. */ |
| 198 | const makeElicitingEngine = ( |