MCPcopy Index your code
hub / github.com/microsoft/TypeChat / createRequestPrompt

Function createRequestPrompt

typescript/src/ts/program.ts:204–212  ·  view source on GitHub ↗
(request: string)

Source from the content-addressed store, hash-verified

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` +

Callers

nothing calls this directly

Calls 1

getSchemaTextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…