An open API service indexing awesome lists of open source software.

https://github.com/emrahcom/llama-native

A lightweight Deno client for llama.cpp with zero dependencies. Supports OpenAI-compatible chat and native GBNF grammar completions.
https://github.com/emrahcom/llama-native

deno jsr llama llama-cpp llamacpp

Last synced: 5 days ago
JSON representation

A lightweight Deno client for llama.cpp with zero dependencies. Supports OpenAI-compatible chat and native GBNF grammar completions.

Awesome Lists containing this project

README

          

# llama-native

**Still in alpha**

A lightweight Deno client for llama.cpp with zero dependencies. Supports
OpenAI-compatible chat and native GBNF grammar completions.

## Usage

Assuming that `llama-server` is running in your local environment...

```Typescript
import { Llama } from "jsr:@emrahcom/llama-native";

const llama = new Llama();
const res = await llama.v1.chat.create({
messages: [
{ role: "user", content: "Hello!" },
],
});

console.log(res.choices[0].message.content);
```

See also [examples](examples).

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file
for details.