Module: RagEmbeddings
- Defined in:
- lib/rag_embeddings/engine.rb,
lib/rag_embeddings/version.rb,
lib/rag_embeddings/database.rb,
ext/rag_embeddings/embedding.c
Defined Under Namespace
Constant Summary collapse
- DEFAULT_MODEL =
"llama3.2".freeze
- VERSION =
"0.2.2".freeze
Class Method Summary collapse
Class Method Details
.embed(text, model: DEFAULT_MODEL) ⇒ Object
17 18 19 |
# File 'lib/rag_embeddings/engine.rb', line 17 def self.(text, model: DEFAULT_MODEL) llm(model:).(text:). end |
.llm(model: DEFAULT_MODEL) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/rag_embeddings/engine.rb', line 6 def self.llm(model: DEFAULT_MODEL) @llm ||= Langchain::LLM::Ollama.new(url: "http://localhost:11434", default_options: { temperature: 0.1, chat_model: model, completion_model: model, embedding_model: model, } ) end |