Skip to main content

COMPLETION

Constant COMPLETION 

Source
pub const COMPLETION: &str = "/completion";
Expand description

llama.cpp’s native completion endpoint, which is not V1_COMPLETIONS with a shorter path.

Different request shape (n_predict, repeat_penalty, cache_prompt, …) and a different response shape (a flat object with content and stop, not choices), and its stream is a sequence of data: {"content":…,"stop":false} frames with no [DONE] sentinel. This is what llama.cpp’s own web UI, llama.vim and a long tail of wrappers speak; /v1/completions is the OpenAI dialect and stays what it is.