Skip to content

Commit 38f2fe1

Browse files
Fix notebook CI (#205)
Because our notebooks are run in parallel using threads, for expedited testing purposes, and using a single redis instance, there were situations where different caches were created with the same name... causing collisions.
1 parent 685de7e commit 38f2fe1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/examples/openai_qna.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@
861861
"source": [
862862
"from redisvl.extensions.llmcache import SemanticCache\n",
863863
"\n",
864-
"cache = SemanticCache(redis_url=\"redis://localhost:6379\", distance_threshold=0.2)"
864+
"cache = SemanticCache(name=\"qna_cache\", redis_url=\"redis://localhost:6379\", distance_threshold=0.2)"
865865
]
866866
},
867867
{

docs/user_guide/llmcache_03.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
"source": [
351351
"llmcache.store(\"This is a TTL test\", \"This is a TTL test response\")\n",
352352
"\n",
353-
"time.sleep(5)"
353+
"time.sleep(6)"
354354
]
355355
},
356356
{
@@ -732,7 +732,7 @@
732732
"name": "python",
733733
"nbconvert_exporter": "python",
734734
"pygments_lexer": "ipython3",
735-
"version": "3.12.2"
735+
"version": "3.11.9"
736736
},
737737
"orig_nbformat": 4
738738
},

docs/user_guide/vectorizers_04.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@
614614
"source": [
615615
"from redisvl.extensions.llmcache import SemanticCache\n",
616616
"\n",
617-
"cache = SemanticCache(vectorizer=custom_vectorizer)\n",
617+
"cache = SemanticCache(name=\"custom_cache\", vectorizer=custom_vectorizer)\n",
618618
"\n",
619619
"cache.store(\"this is a test prompt\", \"this is a test response\")\n",
620620
"cache.check(\"this is also a test prompt\")"

0 commit comments

Comments
 (0)