MCPcopy Create free account
hub / github.com/microsoft/TypeChat / translate

Method translate

typescript/src/typechat.ts:63–63  ·  view source on GitHub ↗

* Translates a natural language request into an object of type `T`. If the JSON object returned by * the language model fails to validate and the `attemptRepair` property is `true`, a second * attempt to translate the request will be made. The prompt for the second attempt will include the

(request: string, promptPreamble?: string | PromptSection[])

Source from the content-addressed store, hash-verified

61 * @returns A promise for the resulting object.
62 */
63 translate(request: string, promptPreamble?: string | PromptSection[]): Promise<Result<T>>;
64}
65
66/**

Callers 13

request_handlerFunction · 0.65
request_handlerFunction · 0.65
request_handlerFunction · 0.65
request_handlerFunction · 0.65
handle_requestMethod · 0.65
handle_requestMethod · 0.65
handle_requestMethod · 0.65
route_requestMethod · 0.65
request_handlerFunction · 0.65
request_handlerFunction · 0.65
translateMethod · 0.65
request_handlerFunction · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected