Spaces:
Running on Zero
Running on Zero
Fixing errors of repeated texts in OpenAI model
Browse filesFiles changed (4)
- .gitignore+1
- app.py+10-8
- llm_graph.py+13-12
- sample/kv_store_doc_status.json+5-21
169 unmodified lines170171172169 unmodified lines*.csvcache/169 unmodified lines170171172173169 unmodified lines*.csvcache/sample/
201 unmodified lines20220320420520620720820921021121221321421537 unmodified lines253254255256257258201 unmodified lines# Configure network displaynetwork.from_nx(G)network.barnes_hut(gravity=-3000,central_gravity=0.3,spring_length=50,spring_strength=0.001,damping=0.09,overlap=0,)# Customize node appearancefor node in network.nodes:37 unmodified linesis_first_example = text == EXAMPLES[0][0]# Ensure RAG is initializedasyncio.run(model.initialize_rag())# Try to load from cache if it's the first example201 unmodified lines20220320420520620720820921021121221321421521637 unmodified lines254255256257258259260201 unmodified lines# Configure network displaynetwork.from_nx(G)if model_name == MODEL_LIST[0]:network.barnes_hut(gravity=-3000,central_gravity=0.3,spring_length=50,spring_strength=0.001,damping=0.09,overlap=0,)# Customize node appearancefor node in network.nodes:37 unmodified linesis_first_example = text == EXAMPLES[0][0]# Ensure RAG is initialized# TODO: Clear all the previous inserted textsasyncio.run(model.initialize_rag())# Try to load from cache if it's the first example
44 unmodified lines4546474849505152535455565758596061109 unmodified lines17117217317417517617744 unmodified linesInitialize the LightRAG instance with the specified embedding dimension."""if self.rag is None:self.rag = LightRAG(working_dir=WORKING_DIR,llm_model_func=self._llm_model_func,embedding_func=EmbeddingFunc(embedding_dim=embedding_dimension,max_token_size=8192,func=self._embedding_func,),)# TODO: Check if this works as expectedawait self.rag.initialize_storages()await initialize_pipeline_status()109 unmodified linesos.makedirs(WORKING_DIR, exist_ok=True)# Use LightRAG with Azure OpenAI# TODO: Clear all the previous inserted texts firstself.rag.insert(text) # Insert the text into the RAG storage# Wait for GRAPHML_FILE to be created44 unmodified lines454647484950515253545556575859606162109 unmodified lines17217317417517617717844 unmodified linesInitialize the LightRAG instance with the specified embedding dimension."""# if self.rag is None:# TODO: Check how to clear all the previous inserted textsself.rag = LightRAG(working_dir=WORKING_DIR,llm_model_func=self._llm_model_func,embedding_func=EmbeddingFunc(embedding_dim=embedding_dimension,max_token_size=8192,func=self._embedding_func,),)await self.rag.initialize_storages()await initialize_pipeline_status()109 unmodified linesos.makedirs(WORKING_DIR, exist_ok=True)# Use LightRAG with Azure OpenAI# TODO: Clear all the previous inserted textsself.rag.insert(text) # Insert the text into the RAG storage# Wait for GRAPHML_FILE to be created
6 unmodified lines78910111213141516171819202122232425262728293031323334356 unmodified lines],"content_summary": "The family of Azerbaijan President Ilham Aliyev leads a charmed, glamorous life, thanks in part to financial interests in almost every sector of the economy. His wife, Mehriban, comes from the privileged and powerful Pashayev family that owns banks, ...","content_length": 1074,"created_at": "2025-08-31T15:50:59.506391+00:00","updated_at": "2025-08-31T15:52:26.018288+00:00","file_path": "unknown_source","track_id": "insert_20250831_235059_6946ff78","metadata": {"processing_start_time": 1756655459,"processing_end_time": 1756655546}},"doc-eea199eb7feea197ebb82e9333a2d2f2": {"status": "processing","chunks_count": 1,"chunks_list": ["chunk-eea199eb7feea197ebb82e9333a2d2f2"],"content_summary": "Les jardins du Luxembourg, situés au cœur du sixième arrondissement de Paris, offrent un véritable havre de paix aux citadins pressés. Créés au début du dix-septième siècle sur l'initiative de Marie de Médicis, ces jardins à la française s'étendent s...","content_length": 697,"created_at": "2025-08-31T15:54:38.060638+00:00","updated_at": "2025-08-31T15:54:38.068349+00:00","file_path": "unknown_source","track_id": "insert_20250831_235438_22d326d7","metadata": {"processing_start_time": 1756655678}}}6 unmodified lines789101112131415161718196 unmodified lines],"content_summary": "The family of Azerbaijan President Ilham Aliyev leads a charmed, glamorous life, thanks in part to financial interests in almost every sector of the economy. His wife, Mehriban, comes from the privileged and powerful Pashayev family that owns banks, ...","content_length": 1074,"created_at": "2025-09-01T14:53:10.896398+00:00","updated_at": "2025-09-01T14:54:44.898862+00:00","file_path": "unknown_source","track_id": "insert_20250901_225310_a186b861","metadata": {"processing_start_time": 1756738390,"processing_end_time": 1756738484}}}
.gitignore+1
app.py+10-8
llm_graph.py+13-12
sample/kv_store_doc_status.json+5-21