(request: string)
| 108 | return typeChat; |
| 109 | |
| 110 | function createRequestPrompt(request: string) { |
| 111 | return `You are a service that translates user requests into JSON objects of type "${validator.getTypeName()}" according to the following TypeScript definitions:\n` + |
| 112 | `\`\`\`\n${validator.getSchemaText()}\`\`\`\n` + |
| 113 | `The following is a user request:\n` + |
| 114 | `"""\n${request}\n"""\n` + |
| 115 | `The following is the user request translated into a JSON object with 2 spaces of indentation and no properties with the value undefined:\n`; |
| 116 | } |
| 117 | |
| 118 | function createRepairPrompt(validationError: string) { |
| 119 | return `The JSON object is invalid for the following reason:\n` + |
nothing calls this directly
no test coverage detected
searching dependent graphs…