Skip to content

Commit

Permalink
0.1.12 to add timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
shohey1226 committed Jul 27, 2023
1 parent 960acfc commit e6593e3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
llm_memory (0.1.11)
llm_memory (0.1.12)
redis (~> 4.6.0)
ruby-openai (~> 3.7.0)
tokenizers (~> 0.3.3)
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ end

To use LLM Memory, follow these steps:

If you want to use pgvector instead of Redisearch. You can use the plugin. Please check the doc and change the setup steps(2&3)

1. Install the gem: gem install llm_memory
2. Set up Redis with Redisearch module enabled - Go to [Reids Cloud](https://redis.com/redis-enterprise-cloud/overview/) and get the redis url
2. Set up Redis with Redisearch module enabled - Go to [Reids Cloud](https://redis.com/redis-enterprise-cloud/overview/) and get the redis url.
3. Configure LLM Memory to connect to your Redis instance
4. Use LlmMemory::Wernicke to load data from your external sources
5. Use LlmMemory::Hippocampus to search for relevant information based on user queries
Expand All @@ -71,12 +73,13 @@ docs = LlmMemory::Wernicke.load(:file, "/tmp/a_directory")
# docs = [{
# content: "Hi there",
# metadata: {
# file_name: "a.txt"
# file_name: "a.txt",
# timestamp: "20201231235959"
# }
# },,,]

hippocampus = LlmMemory::Hippocampus.new
hippocampus.memorize(docs)
res = hippocampus.memorize(docs)

query_str = "What is my name?"
related_docs = hippocampus.query(query_str, limit: 3)
Expand Down
2 changes: 1 addition & 1 deletion lib/llm_memory/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module LlmMemory
VERSION = "0.1.11"
VERSION = "0.1.12"
end

0 comments on commit e6593e3

Please sign in to comment.