Skip to content

Commit 84ccbcd

Browse files
committed
fix(notebooks): rewrite 04_vectorizers.ipynb with correct APIs
Fixed notebook to match actual RedisVL4j API: - Removed broken Maven dependency loading (use local JARs instead) - Fixed class names (use LangChain4JVectorizer, not OpenAIVectorizer) - Fixed IndexSchema builder API (addTextField/addVectorField with consumers) - Fixed VectorField imports (use VectorAlgorithm from Jedis) - Fixed BaseVectorizer API (generateEmbedding/generateEmbeddingsBatch) - Use UnifiedJedis instead of JedisPooled Features demonstrated: - HuggingFace Sentence Transformers (local, no API key) - OpenAI via LangChain4j (text-embedding-ada-002) - Cohere via LangChain4j (embed-english-v3.0) - VoyageAI via LangChain4j (voyage-law-2) - Custom vectorizer implementation - Vector search with same query as Python ("That is a happy cat") All examples verified with VectorizersNotebookIntegrationTest (7/7 passing). Same models and data as Python version: - Sentences: "That is a happy dog", "That is a happy person", "Today is a sunny day" - Query validates semantic search (happy cat → happy dog)
1 parent 1c7fd50 commit 84ccbcd

File tree

1 file changed

+167
-523
lines changed

1 file changed

+167
-523
lines changed

0 commit comments

Comments
 (0)