Find answers from the community

Updated last month

Ingesting a Small Markdown File into FalkorDB Takes Over 90 Seconds

At a glance
This code takes over 90 seconds to ingest a small 32KB markdown file into FalkorDB.
Plain Text
reader = SimpleDirectoryReader(input_dir='data', recursive=False)
documents = reader.load_data()

Settings.llm = OpenAI(model='gpt-4o-mini', api_key=os.getenv('OPENAI_API_KEY'), temperature=0, max_tokens=100)
Settings.chunk_size = 512

graph_store = FalkorDBGraphStore('redis://localhost:6379', decode_responses=True)
storage_context = StorageContext.from_defaults(graph_store=graph_store)

knowledge_graph_index = KnowledgeGraphIndex.from_documents(
    documents,
    max_triplets_per_chunk=5,
    storage_context=storage_context,
)
Add a reply
Sign up and join the conversation on Discord