UNPKG

node-llama-cpp

Version:

Run AI models locally on your machine with node.js bindings for llama.cpp. Enforce a JSON schema on the model output on the generation level

16 lines 554 B
/** * Define a function that can be used by the model in a chat session, and return it. * * This is a helper function to facilitate defining functions with full TypeScript type information. * * The handler function can return a Promise, and the return value will be awaited before being returned to the model. * @param functionDefinition */ export function defineChatSessionFunction({ description, params, handler }) { return { description, params, handler }; } //# sourceMappingURL=defineChatSessionFunction.js.map