Refactor: using sqlmodel(sqlchemy+pydantic) as ORM framework and switch to async-based sqlite operation (#2294)

* stage

* stage

* refactor: using sqlchemy as ORM framework, switch to async-based sqlite operation

- using sqlmodel as ORM(based on sqlchemy and pydantic)
- add Persona, Preference, PlatformMessageHistory table

* fix: conversation

* fix: remove redundant explicit session.commit, and fix some type error

* fix: conversation context issue

* chore: remove comments

* chore: remove exclude_content param
This commit is contained in:
Soulter
2025-08-02 15:44:00 +08:00
committed by GitHub
parent 6661fa996c
commit 842c3c8ea9
22 changed files with 2157 additions and 935 deletions
+3
View File
@@ -18,6 +18,7 @@ dependencies = [
"cryptography>=44.0.3",
"dashscope>=1.23.2",
"defusedxml>=0.7.1",
"deprecated>=1.2.18",
"dingtalk-stream>=0.22.1",
"docstring-parser>=0.16",
"faiss-cpu>=1.10.0",
@@ -42,6 +43,8 @@ dependencies = [
"readability-lxml>=0.8.4.1",
"silk-python>=0.2.6",
"slack-sdk>=3.35.0",
"sqlalchemy[asyncio]>=2.0.41",
"sqlmodel>=0.0.24",
"telegramify-markdown>=0.5.1",
"watchfiles>=1.0.5",
"websockets>=15.0.1",