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

7 lines (6 loc) 342 B
import { ChatHistoryItem } from "../types.js"; /** * Appends a user message to the chat history. * If the last message in the chat history is also a user message, the new message will be appended to it. */ export declare function appendUserMessageToChatHistory(chatHistory: readonly ChatHistoryItem[], message: string): ChatHistoryItem[];