First upload version 0.0.1

This commit is contained in:
Neyra
2026-02-05 15:27:49 +08:00
commit 8e9b7201ed
4182 changed files with 593136 additions and 0 deletions

27
node_modules/node-llama-cpp/dist/ChatWrapper.d.ts generated vendored Normal file
View File

@@ -0,0 +1,27 @@
import { ChatHistoryItem, ChatModelFunctionCall, ChatModelFunctions, ChatModelResponse, ChatWrapperGenerateContextStateOptions, ChatWrapperGeneratedContextState, ChatWrapperGenerateInitialHistoryOptions, ChatWrapperSettings } from "./types.js";
import { LlamaText } from "./utils/LlamaText.js";
import type { JinjaTemplateChatWrapperOptions } from "./chatWrappers/generic/JinjaTemplateChatWrapper.js";
export declare abstract class ChatWrapper {
static defaultSettings: ChatWrapperSettings;
abstract readonly wrapperName: string;
readonly settings: ChatWrapperSettings;
generateContextState({ chatHistory, availableFunctions, documentFunctionParams }: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState;
generateFunctionCallsAndResults(functionCalls: ChatModelFunctionCall[], useRawCall?: boolean): import("./utils/LlamaText.js")._LlamaText;
generateFunctionCall(name: string, params: any): LlamaText;
generateFunctionCallResult(functionName: string, functionParams: any, result: any): LlamaText;
generateModelResponseText(modelResponse: ChatModelResponse["response"], useRawValues?: boolean): LlamaText;
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, { documentParams }: {
documentParams?: boolean;
}): LlamaText;
addAvailableFunctionsSystemMessageToHistory(history: readonly ChatHistoryItem[], availableFunctions?: ChatModelFunctions, { documentParams }?: {
documentParams?: boolean;
}): readonly ChatHistoryItem[];
generateInitialChatHistory({ systemPrompt }?: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[];
}
type FirstItemOfTupleOrFallback<T extends any[], Fallback> = T extends [infer U, ...any[]] ? U : Fallback;
export type ChatWrapperJinjaMatchConfiguration<T extends typeof ChatWrapper> = Array<FirstItemOfTupleOrFallback<ConstructorParameters<T>, object> | [
testConfig: FirstItemOfTupleOrFallback<ConstructorParameters<T>, object>,
applyConfig: FirstItemOfTupleOrFallback<ConstructorParameters<T>, object>,
testJinjaChatWrapperOptions?: JinjaTemplateChatWrapperOptions
]>;
export {};