(input: {
readonly name?: string;
readonly mimeType: string;
readonly data: string;
readonly byteLength: number;
})
| 101 | }); |
| 102 | |
| 103 | const toolFile = (input: { |
| 104 | readonly name?: string; |
| 105 | readonly mimeType: string; |
| 106 | readonly data: string; |
| 107 | readonly byteLength: number; |
| 108 | }): ToolFileValue => ({ |
| 109 | _tag: "ToolFile", |
| 110 | ...(input.name ? { name: input.name } : {}), |
| 111 | mimeType: input.mimeType, |
| 112 | encoding: "base64", |
| 113 | data: input.data, |
| 114 | byteLength: input.byteLength, |
| 115 | }); |
| 116 | |
| 117 | /** Build an engine whose execute triggers one elicitation and returns the handler's result. */ |
| 118 | const makeElicitingEngine = ( |