Skip to content

NodeLlamaCppBackend

Defined in: native-node-llamacpp/src/index.ts:79

Backend adapter for node-llama-cpp.

Uses native bindings to llama.cpp for efficient local inference.

new NodeLlamaCppBackend(config): NodeLlamaCppBackend

Defined in: native-node-llamacpp/src/index.ts:99

NodeLlamaCppConfig

NodeLlamaCppBackend

readonly metadata: AdapterMetadata

Defined in: native-node-llamacpp/src/index.ts:80

Adapter metadata for identification and capabilities.

BackendAdapter.metadata

dispose(): Promise<void>

Defined in: native-node-llamacpp/src/index.ts:350

Clean up resources.

Promise<void>


execute(request): Promise<IRChatResponse>

Defined in: native-node-llamacpp/src/index.ts:176

Execute a non-streaming chat request.

IRChatRequest

Promise<IRChatResponse>

BackendAdapter.execute


executeStream(request): IRChatStream

Defined in: native-node-llamacpp/src/index.ts:248

Execute a streaming chat request.

IRChatRequest

IRChatStream

BackendAdapter.executeStream


fromIR(request): IRChatRequest

Defined in: native-node-llamacpp/src/index.ts:158

Convert IR request to provider format (passthrough - uses IR internally).

IRChatRequest

IRChatRequest

BackendAdapter.fromIR


initialize(): Promise<void>

Defined in: native-node-llamacpp/src/index.ts:115

Initialize the model and context. Must be called before using execute() or executeStream().

Promise<void>


toIR(response, _originalRequest, _latencyMs): IRChatResponse

Defined in: native-node-llamacpp/src/index.ts:165

Convert provider response to IR format (passthrough - uses IR internally).

IRChatResponse

IRChatRequest

number

IRChatResponse

BackendAdapter.toIR