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

Function createRequestPrompt

typescript/src/typechat.ts:110–116  ·  view source on GitHub ↗
(request: string)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

getTypeNameMethod · 0.80
getSchemaTextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…