MCPcopy
hub / github.com/PromtEngineer/localGPT / add_document_to_index

Method add_document_to_index

backend/database.py:374–378  ·  view source on GitHub ↗
(self, index_id: str, filename: str, stored_path: str)

Source from the content-addressed store, hash-verified

372 return res
373
374 def add_document_to_index(self, index_id: str, filename: str, stored_path: str):
375 conn = sqlite3.connect(self.db_path)
376 conn.execute('INSERT INTO index_documents (index_id, original_filename, stored_path) VALUES (?,?,?)', (index_id, filename, stored_path))
377 conn.commit()
378 conn.close()
379
380 def link_index_to_session(self, session_id: str, index_id: str):
381 conn = sqlite3.connect(self.db_path)

Callers 4

create_single_indexMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected