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

Method validateInstance

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

* Optionally implements additional validation logic beyond what is expressed in the schema. This function is * called following successful schema validation of an instance. By default the function just returns a * `Success ` for the given instance, but an application can assign a new fun

(instance: T)

Source from the content-addressed store, hash-verified

50 * @returns A `Success<T>` with the final validated instance, or an `Error` explaining the validation failure.
51 */
52 validateInstance(instance: T): Result<T>;
53 /**
54 * Translates a natural language request into an object of type `T`. If the JSON object returned by
55 * the language model fails to validate and the `attemptRepair` property is `true`, a second

Callers 1

translateFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected