Module: Llmemory::LongTerm::GraphBased::Storages
- Defined in:
- lib/llmemory/long_term/graph_based/storage.rb,
lib/llmemory/long_term/graph_based/storages/base.rb,
lib/llmemory/long_term/graph_based/storages/memory_storage.rb,
lib/llmemory/long_term/graph_based/storages/active_record_models.rb,
lib/llmemory/long_term/graph_based/storages/active_record_storage.rb
Defined Under Namespace
Classes: ActiveRecordStorage, Base, LlmemoryGraphEdge, LlmemoryGraphNode, MemoryStorage
Class Method Summary collapse
Class Method Details
.build(store: nil, cipher: nil) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/llmemory/long_term/graph_based/storage.rb', line 10 def self.build(store: nil, cipher: nil) resolved_cipher = cipher || Llmemory.build_cipher case (store || Llmemory.configuration.long_term_store).to_s.to_sym when :memory MemoryStorage.new when :active_record, :activerecord require_relative "storages/active_record_storage" ActiveRecordStorage.new(cipher: resolved_cipher) else MemoryStorage.new end end |