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.
This commit is contained in:
45
check_db.py
Normal file
45
check_db.py
Normal file
@@ -0,0 +1,45 @@
|
||||
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.")
|
||||
Reference in New Issue
Block a user