Class: LLM::LlamaCpp
Overview
The LlamaCpp class implements a provider for [llama.cpp](github.com/ggml-org/llama.cpp) through the OpenAI-compatible API provided by the llama-server binary. Similar to the ollama provider, this provider supports a wide range of models and is straightforward to run on your own hardware.
Constant Summary
Constants inherited
from OpenAI
OpenAI::HOST
Instance Method Summary
collapse
Methods inherited from OpenAI
#assistant_role, #complete, #embed, #models, #server_tools, #web_search
#adapt
Methods inherited from Provider
#assistant_role, #chat, #complete, #developer_role, #embed, #inspect, #interrupt!, #models, #persist!, #respond, #schema, #server_tool, #server_tools, #streamable?, #system_role, #tool_role, #tracer, #tracer=, #user_role, #web_search, #with
Constructor Details
#initialize(host: "localhost", port: 8080, ssl: false) ⇒ LLM::LlamaCpp
26
27
28
|
# File 'lib/llm/providers/llamacpp.rb', line 26
def initialize(host: "localhost", port: 8080, ssl: false, **)
super
end
|
Instance Method Details
51
52
53
|
# File 'lib/llm/providers/llamacpp.rb', line 51
def audio
raise NotImplementedError
end
|
#default_model ⇒ String
Returns the default model for chat completions
77
78
79
|
# File 'lib/llm/providers/llamacpp.rb', line 77
def default_model
"qwen3"
end
|
39
40
41
|
# File 'lib/llm/providers/llamacpp.rb', line 39
def files
raise NotImplementedError
end
|
45
46
47
|
# File 'lib/llm/providers/llamacpp.rb', line 45
def images
raise NotImplementedError
end
|
#moderations ⇒ Object
57
58
59
|
# File 'lib/llm/providers/llamacpp.rb', line 57
def moderations
raise NotImplementedError
end
|
#name ⇒ Symbol
Returns the provider’s name
33
34
35
|
# File 'lib/llm/providers/llamacpp.rb', line 33
def name
:llamacpp
end
|
#responses ⇒ Object
63
64
65
|
# File 'lib/llm/providers/llamacpp.rb', line 63
def responses
raise NotImplementedError
end
|
#vector_stores ⇒ Object
69
70
71
|
# File 'lib/llm/providers/llamacpp.rb', line 69
def vector_stores
raise NotImplementedError
end
|