(request: string)
| 202 | return translator; |
| 203 | |
| 204 | function createRequestPrompt(request: string) { |
| 205 | return `You are a service that translates user requests into programs represented as JSON using the following TypeScript definitions:\n` + |
| 206 | `\`\`\`\n${programSchemaText}\`\`\`\n` + |
| 207 | `The programs can call functions from the API defined in the following TypeScript definitions:\n` + |
| 208 | `\`\`\`\n${validator.getSchemaText()}\`\`\`\n` + |
| 209 | `The following is a user request:\n` + |
| 210 | `"""\n${request}\n"""\n` + |
| 211 | `The following is the user request translated into a JSON program object with 2 spaces of indentation and no properties with the value undefined:\n`; |
| 212 | } |
| 213 | |
| 214 | function createRepairPrompt(validationError: string) { |
| 215 | return `The JSON program object is invalid for the following reason:\n` + |
nothing calls this directly
no test coverage detected
searching dependent graphs…