Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,14 +37,10 @@ class ZhipuAILLM(LLM):
|
|
| 37 |
)
|
| 38 |
return response.choices[0].message.content
|
| 39 |
|
| 40 |
-
# Database setup
|
| 41 |
-
|
| 42 |
-
DB_PATH = os.path.join(DB_DIR, "chat_history.db")
|
| 43 |
|
| 44 |
def init_db():
|
| 45 |
-
# Create the data directory if it doesn't exist
|
| 46 |
-
os.makedirs(DB_DIR, exist_ok=True)
|
| 47 |
-
|
| 48 |
conn = sqlite3.connect(DB_PATH)
|
| 49 |
cursor = conn.cursor()
|
| 50 |
cursor.execute('''
|
|
|
|
| 37 |
)
|
| 38 |
return response.choices[0].message.content
|
| 39 |
|
| 40 |
+
# Database setup - use current directory
|
| 41 |
+
DB_PATH = "chat_history.db"
|
|
|
|
| 42 |
|
| 43 |
def init_db():
|
|
|
|
|
|
|
|
|
|
| 44 |
conn = sqlite3.connect(DB_PATH)
|
| 45 |
cursor = conn.cursor()
|
| 46 |
cursor.execute('''
|