Class: Llmemory::Configuration
- Inherits:
-
Object
- Object
- Llmemory::Configuration
- Defined in:
- lib/llmemory/configuration.rb
Instance Attribute Summary collapse
-
#auto_recall_enabled ⇒ Object
Returns the value of attribute auto_recall_enabled.
-
#bm25_weight ⇒ Object
Returns the value of attribute bm25_weight.
-
#compact_max_bytes ⇒ Object
Returns the value of attribute compact_max_bytes.
-
#context_window_tokens ⇒ Object
Returns the value of attribute context_window_tokens.
-
#daily_logs_enabled ⇒ Object
Returns the value of attribute daily_logs_enabled.
-
#database_url ⇒ Object
Returns the value of attribute database_url.
-
#embedding_cache_enabled ⇒ Object
Returns the value of attribute embedding_cache_enabled.
-
#embedding_cache_max_entries ⇒ Object
Returns the value of attribute embedding_cache_max_entries.
-
#flush_once_per_cycle_seconds ⇒ Object
Returns the value of attribute flush_once_per_cycle_seconds.
-
#hybrid_search_enabled ⇒ Object
Returns the value of attribute hybrid_search_enabled.
-
#importance_weight ⇒ Object
Returns the value of attribute importance_weight.
-
#keep_recent_tokens ⇒ Object
Returns the value of attribute keep_recent_tokens.
-
#llm_api_key ⇒ Object
Returns the value of attribute llm_api_key.
-
#llm_base_url ⇒ Object
Returns the value of attribute llm_base_url.
-
#llm_model ⇒ Object
Returns the value of attribute llm_model.
-
#llm_provider ⇒ Object
Returns the value of attribute llm_provider.
-
#long_term_storage_path ⇒ Object
Returns the value of attribute long_term_storage_path.
-
#long_term_store ⇒ Object
Returns the value of attribute long_term_store.
-
#long_term_type ⇒ Object
Returns the value of attribute long_term_type.
-
#max_message_chars ⇒ Object
Returns the value of attribute max_message_chars.
-
#max_retrieval_tokens ⇒ Object
Returns the value of attribute max_retrieval_tokens.
-
#memory_flush_enabled ⇒ Object
Returns the value of attribute memory_flush_enabled.
-
#memory_flush_threshold_tokens ⇒ Object
Returns the value of attribute memory_flush_threshold_tokens.
-
#message_sanitizer_enabled ⇒ Object
Returns the value of attribute message_sanitizer_enabled.
-
#mmr_enabled ⇒ Object
Returns the value of attribute mmr_enabled.
-
#mmr_lambda ⇒ Object
Returns the value of attribute mmr_lambda.
-
#noise_filter_enabled ⇒ Object
Returns the value of attribute noise_filter_enabled.
-
#noise_filter_min_chars ⇒ Object
Returns the value of attribute noise_filter_min_chars.
-
#overflow_recovery_enabled ⇒ Object
Returns the value of attribute overflow_recovery_enabled.
-
#prune_after_days ⇒ Object
Returns the value of attribute prune_after_days.
-
#prune_tool_results_enabled ⇒ Object
Returns the value of attribute prune_tool_results_enabled.
-
#prune_tool_results_max_bytes ⇒ Object
Returns the value of attribute prune_tool_results_max_bytes.
-
#prune_tool_results_mode ⇒ Object
Returns the value of attribute prune_tool_results_mode.
-
#redis_url ⇒ Object
Returns the value of attribute redis_url.
-
#reserve_tokens ⇒ Object
Returns the value of attribute reserve_tokens.
-
#retrieval_feedback_weight ⇒ Object
Returns the value of attribute retrieval_feedback_weight.
-
#session_idle_minutes ⇒ Object
Returns the value of attribute session_idle_minutes.
-
#session_max_entries_per_user ⇒ Object
Returns the value of attribute session_max_entries_per_user.
-
#session_prune_after_days ⇒ Object
Returns the value of attribute session_prune_after_days.
-
#short_term_store ⇒ Object
Returns the value of attribute short_term_store.
-
#time_decay_half_life_days ⇒ Object
Returns the value of attribute time_decay_half_life_days.
-
#vector_store ⇒ Object
Returns the value of attribute vector_store.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/llmemory/configuration.rb', line 48 def initialize @llm_provider = :openai @llm_api_key = ENV["OPENAI_API_KEY"] @llm_model = "gpt-4" @llm_base_url = nil @short_term_store = :memory @redis_url = ENV["REDIS_URL"] || "redis://localhost:6379/0" @long_term_type = :file_based @long_term_store = :memory @long_term_storage_path = ENV["LLMEMORY_STORAGE_PATH"] || "./llmemory_data" @database_url = ENV["DATABASE_URL"] @vector_store = nil @time_decay_half_life_days = 30 @importance_weight = 1.0 @retrieval_feedback_weight = 0.5 @max_retrieval_tokens = 2000 @prune_after_days = 90 @compact_max_bytes = 8192 @memory_flush_enabled = true @memory_flush_threshold_tokens = 4000 @hybrid_search_enabled = true @bm25_weight = 0.3 @mmr_enabled = false @mmr_lambda = 0.7 @prune_tool_results_enabled = false @prune_tool_results_mode = :soft_trim @prune_tool_results_max_bytes = 2048 @context_window_tokens = 128_000 @reserve_tokens = 16_384 @keep_recent_tokens = 20_000 @session_idle_minutes = 60 @session_prune_after_days = 30 @session_max_entries_per_user = 500 @daily_logs_enabled = false @auto_recall_enabled = false @noise_filter_enabled = false @noise_filter_min_chars = 10 @flush_once_per_cycle_seconds = 60 @overflow_recovery_enabled = false @embedding_cache_enabled = true @embedding_cache_max_entries = 10_000 @max_message_chars = 32_000 @message_sanitizer_enabled = false end |
Instance Attribute Details
#auto_recall_enabled ⇒ Object
Returns the value of attribute auto_recall_enabled.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def auto_recall_enabled @auto_recall_enabled end |
#bm25_weight ⇒ Object
Returns the value of attribute bm25_weight.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def bm25_weight @bm25_weight end |
#compact_max_bytes ⇒ Object
Returns the value of attribute compact_max_bytes.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def compact_max_bytes @compact_max_bytes end |
#context_window_tokens ⇒ Object
Returns the value of attribute context_window_tokens.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def context_window_tokens @context_window_tokens end |
#daily_logs_enabled ⇒ Object
Returns the value of attribute daily_logs_enabled.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def daily_logs_enabled @daily_logs_enabled end |
#database_url ⇒ Object
Returns the value of attribute database_url.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def database_url @database_url end |
#embedding_cache_enabled ⇒ Object
Returns the value of attribute embedding_cache_enabled.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def @embedding_cache_enabled end |
#embedding_cache_max_entries ⇒ Object
Returns the value of attribute embedding_cache_max_entries.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def @embedding_cache_max_entries end |
#flush_once_per_cycle_seconds ⇒ Object
Returns the value of attribute flush_once_per_cycle_seconds.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def flush_once_per_cycle_seconds @flush_once_per_cycle_seconds end |
#hybrid_search_enabled ⇒ Object
Returns the value of attribute hybrid_search_enabled.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def hybrid_search_enabled @hybrid_search_enabled end |
#importance_weight ⇒ Object
Returns the value of attribute importance_weight.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def importance_weight @importance_weight end |
#keep_recent_tokens ⇒ Object
Returns the value of attribute keep_recent_tokens.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def keep_recent_tokens @keep_recent_tokens end |
#llm_api_key ⇒ Object
Returns the value of attribute llm_api_key.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def llm_api_key @llm_api_key end |
#llm_base_url ⇒ Object
Returns the value of attribute llm_base_url.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def llm_base_url @llm_base_url end |
#llm_model ⇒ Object
Returns the value of attribute llm_model.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def llm_model @llm_model end |
#llm_provider ⇒ Object
Returns the value of attribute llm_provider.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def llm_provider @llm_provider end |
#long_term_storage_path ⇒ Object
Returns the value of attribute long_term_storage_path.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def long_term_storage_path @long_term_storage_path end |
#long_term_store ⇒ Object
Returns the value of attribute long_term_store.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def long_term_store @long_term_store end |
#long_term_type ⇒ Object
Returns the value of attribute long_term_type.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def long_term_type @long_term_type end |
#max_message_chars ⇒ Object
Returns the value of attribute max_message_chars.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def @max_message_chars end |
#max_retrieval_tokens ⇒ Object
Returns the value of attribute max_retrieval_tokens.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def max_retrieval_tokens @max_retrieval_tokens end |
#memory_flush_enabled ⇒ Object
Returns the value of attribute memory_flush_enabled.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def memory_flush_enabled @memory_flush_enabled end |
#memory_flush_threshold_tokens ⇒ Object
Returns the value of attribute memory_flush_threshold_tokens.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def memory_flush_threshold_tokens @memory_flush_threshold_tokens end |
#message_sanitizer_enabled ⇒ Object
Returns the value of attribute message_sanitizer_enabled.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def @message_sanitizer_enabled end |
#mmr_enabled ⇒ Object
Returns the value of attribute mmr_enabled.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def mmr_enabled @mmr_enabled end |
#mmr_lambda ⇒ Object
Returns the value of attribute mmr_lambda.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def mmr_lambda @mmr_lambda end |
#noise_filter_enabled ⇒ Object
Returns the value of attribute noise_filter_enabled.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def noise_filter_enabled @noise_filter_enabled end |
#noise_filter_min_chars ⇒ Object
Returns the value of attribute noise_filter_min_chars.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def noise_filter_min_chars @noise_filter_min_chars end |
#overflow_recovery_enabled ⇒ Object
Returns the value of attribute overflow_recovery_enabled.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def overflow_recovery_enabled @overflow_recovery_enabled end |
#prune_after_days ⇒ Object
Returns the value of attribute prune_after_days.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def prune_after_days @prune_after_days end |
#prune_tool_results_enabled ⇒ Object
Returns the value of attribute prune_tool_results_enabled.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def prune_tool_results_enabled @prune_tool_results_enabled end |
#prune_tool_results_max_bytes ⇒ Object
Returns the value of attribute prune_tool_results_max_bytes.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def prune_tool_results_max_bytes @prune_tool_results_max_bytes end |
#prune_tool_results_mode ⇒ Object
Returns the value of attribute prune_tool_results_mode.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def prune_tool_results_mode @prune_tool_results_mode end |
#redis_url ⇒ Object
Returns the value of attribute redis_url.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def redis_url @redis_url end |
#reserve_tokens ⇒ Object
Returns the value of attribute reserve_tokens.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def reserve_tokens @reserve_tokens end |
#retrieval_feedback_weight ⇒ Object
Returns the value of attribute retrieval_feedback_weight.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def retrieval_feedback_weight @retrieval_feedback_weight end |
#session_idle_minutes ⇒ Object
Returns the value of attribute session_idle_minutes.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def session_idle_minutes @session_idle_minutes end |
#session_max_entries_per_user ⇒ Object
Returns the value of attribute session_max_entries_per_user.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def session_max_entries_per_user @session_max_entries_per_user end |
#session_prune_after_days ⇒ Object
Returns the value of attribute session_prune_after_days.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def session_prune_after_days @session_prune_after_days end |
#short_term_store ⇒ Object
Returns the value of attribute short_term_store.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def short_term_store @short_term_store end |
#time_decay_half_life_days ⇒ Object
Returns the value of attribute time_decay_half_life_days.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def time_decay_half_life_days @time_decay_half_life_days end |
#vector_store ⇒ Object
Returns the value of attribute vector_store.
5 6 7 |
# File 'lib/llmemory/configuration.rb', line 5 def vector_store @vector_store end |