Skip to content

check if doc exists before inserting via IngestionPipeline #15910

Answered by dosubot bot
johnhu33 asked this question in Q&A
Discussion options

You must be logged in to vote
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
from llama_index.core.ingestion import (
    DocstoreStrategy,
    IngestionPipeline,
    IngestionCache,
)
from llama_index.storage.kvstore.redis import RedisKVStore as RedisCache
from llama_index.storage.docstore.redis import RedisDocumentStore
from llama_index.core.node_parser import SentenceSplitter
from llama_index.vector_stores.redis import RedisVectorStore
from llama_index.core import SimpleDirectoryReader
from redisvl.schema import IndexSchema

# Set up environment variables
import os
os.environ["OPENAI_API_KEY"] = "sk-..."
os.environ["TOKENIZERS_PARALLELISM"] = "false"

# Create seed data
!rm -rf test_redis_data
!m

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@johnhu33
Comment options

@dosubot
Comment options

Answer selected by johnhu33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant