Files
Brancheneinstufung2/check_db.py
Floke 4568623e77 fix(transcription): [2f388f42] finalize and fix AI insights feature
This commit resolves all outstanding issues with the AI Insights feature.

- Corrects the transcript formatting logic in  to properly handle the database JSON structure, ensuring the AI receives the correct context.
- Fixes the Gemini API client by using the correct model name ('gemini-2.0-flash') and the proper client initialization.
- Updates  to securely pass the API key as an environment variable to the container.
- Cleans up the codebase by removing temporary debugging endpoints.
- Adds  script for programmatic updates.
- Updates documentation with troubleshooting insights from the implementation process.
2026-01-26 08:53:13 +00:00

46 lines
1.2 KiB
Python

import sqlite3
import os
dbs = [
"/app/companies_v4_notion_sync.db",
"/app/companies_v3_final.db",
"/app/company-explorer/companies_v3_fixed_2.db",
"/app/company-explorer/companies.db"
]
found = False
for db_path in dbs:
if not os.path.exists(db_path):
continue
print(f"Checking {db_path}...")
try:
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
# Get column names
cursor.execute("PRAGMA table_info(companies)")
columns = [info[1] for info in cursor.fetchall()]
print(f"Columns: {columns}")
cursor.execute("SELECT * FROM companies WHERE name LIKE '%Wolfra%'")
rows = cursor.fetchall()
if rows:
print(f"Found {len(rows)} rows in {db_path}:")
for row in rows:
# Create a dict for easier reading
row_dict = dict(zip(columns, row))
print(row_dict)
found = True
else:
print("No matching rows found.")
conn.close()
except Exception as e:
print(f"Error reading {db_path}: {e}")
print("-" * 20)
if not found:
print("No 'Wolfra' company found in any checked database.")