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

Method init_database

backend/simple_pdf_processor.py:20–34  ·  view source on GitHub ↗

Initialize SQLite database for storing PDF content

(self)

Source from the content-addressed store, hash-verified

18 print("✅ Simple PDF processor initialized")
19
20 def init_database(self):
21 """Initialize SQLite database for storing PDF content"""
22 conn = sqlite3.connect(self.db_path)
23 conn.execute('''
24 CREATE TABLE IF NOT EXISTS pdf_documents (
25 id TEXT PRIMARY KEY,
26 session_id TEXT NOT NULL,
27 filename TEXT NOT NULL,
28 content TEXT NOT NULL,
29 created_at TEXT NOT NULL
30 )
31 ''')
32
33 conn.commit()
34 conn.close()
35
36 def extract_text_from_pdf(self, pdf_bytes: bytes) -> str:
37 """Extract text from PDF bytes"""

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected