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