Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Show errors with user-defined sqlite3 functions #241

davidmezzetti289e9af84968
diff --git a/src/python/txtai/database/sqlite.py b/src/python/txtai/database/sqlite.py
index 7d829621..1e83efea 100644
--- a/src/python/txtai/database/sqlite.py
+++ b/src/python/txtai/database/sqlite.py
@@ -331,6 +331,9 @@ class SQLite(Database):
"""
if self.connection and self.functions:
+ # Enable callback tracebacks to show user-defined function errors
+ sqlite3.enable_callback_tracebacks(True)
+
for name, argcount, fn in self.functions:
self.connection.create_function(name, argcount, fn)