MCPcopy Create free account
hub / github.com/PromtEngineer/localGPT / link_index_to_session

Method link_index_to_session

backend/database.py:380–384  ·  view source on GitHub ↗
(self, session_id: str, index_id: str)

Source from the content-addressed store, hash-verified

378 conn.close()
379
380 def link_index_to_session(self, session_id: str, index_id: str):
381 conn = sqlite3.connect(self.db_path)
382 conn.execute('INSERT INTO session_indexes (session_id, index_id, linked_at) VALUES (?,?,?)', (session_id, index_id, datetime.now().isoformat()))
383 conn.commit()
384 conn.close()
385
386 def get_indexes_for_session(self, session_id: str) -> list[str]:
387 conn = sqlite3.connect(self.db_path)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected