Aasher commited on
Commit
08dd282
·
1 Parent(s): 7c8e7f2

Refactor configuration settings and update dependencies

Browse files
Files changed (3) hide show
  1. core/config.py +4 -12
  2. pyproject.toml +1 -0
  3. uv.lock +112 -0
core/config.py CHANGED
@@ -1,5 +1,4 @@
1
  from pydantic_settings import BaseSettings, SettingsConfigDict
2
- from pathlib import Path
3
 
4
  class Settings(BaseSettings):
5
  model_config = SettingsConfigDict(
@@ -15,16 +14,9 @@ class Settings(BaseSettings):
15
  NEO4J_PASSWORD: str
16
 
17
  # --- Models Configuration ---
18
- OPENAI_API_KEY: str
19
  GOOGLE_API_KEY: str
20
- DEFAULT_MODEL: str = "gemini-2.5-flash"
21
- EMBEDDINGS_MODEL: str = "text-embedding-004"
22
- KNOWLEDGE_GRAPH_BUILDER: str = "gemini-2.0-flash"
23
 
24
-
25
- settings = Settings()
26
-
27
- ROOT_DIR = Path(__file__).parent.parent
28
- INGESTION_DIR = ROOT_DIR / "ingestion"
29
- DOCUMENTS_DIR = INGESTION_DIR / "data"
30
- METADATA_FILE = INGESTION_DIR / "metadata.csv"
 
1
  from pydantic_settings import BaseSettings, SettingsConfigDict
 
2
 
3
  class Settings(BaseSettings):
4
  model_config = SettingsConfigDict(
 
14
  NEO4J_PASSWORD: str
15
 
16
  # --- Models Configuration ---
 
17
  GOOGLE_API_KEY: str
18
+ DEFAULT_MODEL: str
19
+ EMBEDDINGS_MODEL: str
 
20
 
21
+ def get_settings():
22
+ return Settings()
 
 
 
 
 
pyproject.toml CHANGED
@@ -14,6 +14,7 @@ dependencies = [
14
  "langchain-groq>=0.3.5",
15
  "langchain-pinecone>=0.2.8",
16
  "langgraph>=0.5.0",
 
17
  "neo4j>=5.28.1",
18
  "pandas>=2.3.0",
19
  "pinecone>=7.3.0",
 
14
  "langchain-groq>=0.3.5",
15
  "langchain-pinecone>=0.2.8",
16
  "langgraph>=0.5.0",
17
+ "mem0ai>=0.1.114",
18
  "neo4j>=5.28.1",
19
  "pandas>=2.3.0",
20
  "pinecone>=7.3.0",
uv.lock CHANGED
@@ -169,6 +169,15 @@ wheels = [
169
  { url = "https://files.pythonhosted.org/packages/77/06/bb80f5f86020c4551da315d78b3ab75e8228f89f0162f2c3a819e407941a/attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3", size = 63815 },
170
  ]
171
 
 
 
 
 
 
 
 
 
 
172
  [[package]]
173
  name = "cachetools"
174
  version = "5.5.2"
@@ -658,6 +667,28 @@ wheels = [
658
  { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515 },
659
  ]
660
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
661
  [[package]]
662
  name = "httpcore"
663
  version = "1.0.9"
@@ -686,6 +717,11 @@ wheels = [
686
  { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517 },
687
  ]
688
 
 
 
 
 
 
689
  [[package]]
690
  name = "httpx-sse"
691
  version = "0.4.1"
@@ -695,6 +731,15 @@ wheels = [
695
  { url = "https://files.pythonhosted.org/packages/25/0a/6269e3473b09aed2dab8aa1a600c70f31f00ae1349bee30658f7e358a159/httpx_sse-0.4.1-py3-none-any.whl", hash = "sha256:cba42174344c3a5b06f255ce65b350880f962d99ead85e776f23c6618a377a37", size = 8054 },
696
  ]
697
 
 
 
 
 
 
 
 
 
 
698
  [[package]]
699
  name = "idna"
700
  version = "3.10"
@@ -1133,6 +1178,7 @@ dependencies = [
1133
  { name = "langchain-groq" },
1134
  { name = "langchain-pinecone" },
1135
  { name = "langgraph" },
 
1136
  { name = "neo4j" },
1137
  { name = "pandas" },
1138
  { name = "pinecone" },
@@ -1152,6 +1198,7 @@ requires-dist = [
1152
  { name = "langchain-groq", specifier = ">=0.3.5" },
1153
  { name = "langchain-pinecone", specifier = ">=0.2.8" },
1154
  { name = "langgraph", specifier = ">=0.5.0" },
 
1155
  { name = "neo4j", specifier = ">=5.28.1" },
1156
  { name = "pandas", specifier = ">=2.3.0" },
1157
  { name = "pinecone", specifier = ">=7.3.0" },
@@ -1205,6 +1252,23 @@ wheels = [
1205
  { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979 },
1206
  ]
1207
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1208
  [[package]]
1209
  name = "multidict"
1210
  version = "6.6.3"
@@ -1613,6 +1677,35 @@ wheels = [
1613
  { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538 },
1614
  ]
1615
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1616
  [[package]]
1617
  name = "prompt-toolkit"
1618
  version = "3.0.51"
@@ -2120,6 +2213,25 @@ wheels = [
2120
  { url = "https://files.pythonhosted.org/packages/be/8a/4a3764a68abc02e2fbb0668d225b6fda5cd39586dd099cee8b2ed6ab0452/pyzmq-27.0.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:9df43a2459cd3a3563404c1456b2c4c69564daa7dbaf15724c09821a3329ce46", size = 544726 },
2121
  ]
2122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2123
  [[package]]
2124
  name = "redis"
2125
  version = "5.3.0"
 
169
  { url = "https://files.pythonhosted.org/packages/77/06/bb80f5f86020c4551da315d78b3ab75e8228f89f0162f2c3a819e407941a/attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3", size = 63815 },
170
  ]
171
 
172
+ [[package]]
173
+ name = "backoff"
174
+ version = "2.2.1"
175
+ source = { registry = "https://pypi.org/simple" }
176
+ sdist = { url = "https://files.pythonhosted.org/packages/47/d7/5bbeb12c44d7c4f2fb5b56abce497eb5ed9f34d85701de869acedd602619/backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba", size = 17001 }
177
+ wheels = [
178
+ { url = "https://files.pythonhosted.org/packages/df/73/b6e24bd22e6720ca8ee9a85a0c4a2971af8497d8f3193fa05390cbd46e09/backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8", size = 15148 },
179
+ ]
180
+
181
  [[package]]
182
  name = "cachetools"
183
  version = "5.5.2"
 
667
  { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515 },
668
  ]
669
 
670
+ [[package]]
671
+ name = "h2"
672
+ version = "4.2.0"
673
+ source = { registry = "https://pypi.org/simple" }
674
+ dependencies = [
675
+ { name = "hpack" },
676
+ { name = "hyperframe" },
677
+ ]
678
+ sdist = { url = "https://files.pythonhosted.org/packages/1b/38/d7f80fd13e6582fb8e0df8c9a653dcc02b03ca34f4d72f34869298c5baf8/h2-4.2.0.tar.gz", hash = "sha256:c8a52129695e88b1a0578d8d2cc6842bbd79128ac685463b887ee278126ad01f", size = 2150682 }
679
+ wheels = [
680
+ { url = "https://files.pythonhosted.org/packages/d0/9e/984486f2d0a0bd2b024bf4bc1c62688fcafa9e61991f041fb0e2def4a982/h2-4.2.0-py3-none-any.whl", hash = "sha256:479a53ad425bb29af087f3458a61d30780bc818e4ebcf01f0b536ba916462ed0", size = 60957 },
681
+ ]
682
+
683
+ [[package]]
684
+ name = "hpack"
685
+ version = "4.1.0"
686
+ source = { registry = "https://pypi.org/simple" }
687
+ sdist = { url = "https://files.pythonhosted.org/packages/2c/48/71de9ed269fdae9c8057e5a4c0aa7402e8bb16f2c6e90b3aa53327b113f8/hpack-4.1.0.tar.gz", hash = "sha256:ec5eca154f7056aa06f196a557655c5b009b382873ac8d1e66e79e87535f1dca", size = 51276 }
688
+ wheels = [
689
+ { url = "https://files.pythonhosted.org/packages/07/c6/80c95b1b2b94682a72cbdbfb85b81ae2daffa4291fbfa1b1464502ede10d/hpack-4.1.0-py3-none-any.whl", hash = "sha256:157ac792668d995c657d93111f46b4535ed114f0c9c8d672271bbec7eae1b496", size = 34357 },
690
+ ]
691
+
692
  [[package]]
693
  name = "httpcore"
694
  version = "1.0.9"
 
717
  { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517 },
718
  ]
719
 
720
+ [package.optional-dependencies]
721
+ http2 = [
722
+ { name = "h2" },
723
+ ]
724
+
725
  [[package]]
726
  name = "httpx-sse"
727
  version = "0.4.1"
 
731
  { url = "https://files.pythonhosted.org/packages/25/0a/6269e3473b09aed2dab8aa1a600c70f31f00ae1349bee30658f7e358a159/httpx_sse-0.4.1-py3-none-any.whl", hash = "sha256:cba42174344c3a5b06f255ce65b350880f962d99ead85e776f23c6618a377a37", size = 8054 },
732
  ]
733
 
734
+ [[package]]
735
+ name = "hyperframe"
736
+ version = "6.1.0"
737
+ source = { registry = "https://pypi.org/simple" }
738
+ sdist = { url = "https://files.pythonhosted.org/packages/02/e7/94f8232d4a74cc99514c13a9f995811485a6903d48e5d952771ef6322e30/hyperframe-6.1.0.tar.gz", hash = "sha256:f630908a00854a7adeabd6382b43923a4c4cd4b821fcb527e6ab9e15382a3b08", size = 26566 }
739
+ wheels = [
740
+ { url = "https://files.pythonhosted.org/packages/48/30/47d0bf6072f7252e6521f3447ccfa40b421b6824517f82854703d0f5a98b/hyperframe-6.1.0-py3-none-any.whl", hash = "sha256:b03380493a519fce58ea5af42e4a42317bf9bd425596f7a0835ffce80f1a42e5", size = 13007 },
741
+ ]
742
+
743
  [[package]]
744
  name = "idna"
745
  version = "3.10"
 
1178
  { name = "langchain-groq" },
1179
  { name = "langchain-pinecone" },
1180
  { name = "langgraph" },
1181
+ { name = "mem0ai" },
1182
  { name = "neo4j" },
1183
  { name = "pandas" },
1184
  { name = "pinecone" },
 
1198
  { name = "langchain-groq", specifier = ">=0.3.5" },
1199
  { name = "langchain-pinecone", specifier = ">=0.2.8" },
1200
  { name = "langgraph", specifier = ">=0.5.0" },
1201
+ { name = "mem0ai", specifier = ">=0.1.114" },
1202
  { name = "neo4j", specifier = ">=5.28.1" },
1203
  { name = "pandas", specifier = ">=2.3.0" },
1204
  { name = "pinecone", specifier = ">=7.3.0" },
 
1252
  { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979 },
1253
  ]
1254
 
1255
+ [[package]]
1256
+ name = "mem0ai"
1257
+ version = "0.1.114"
1258
+ source = { registry = "https://pypi.org/simple" }
1259
+ dependencies = [
1260
+ { name = "openai" },
1261
+ { name = "posthog" },
1262
+ { name = "pydantic" },
1263
+ { name = "pytz" },
1264
+ { name = "qdrant-client" },
1265
+ { name = "sqlalchemy" },
1266
+ ]
1267
+ sdist = { url = "https://files.pythonhosted.org/packages/87/47/81f43e173940d000694eb20a70c0a92149c53edd2095e34b618afa41ca7d/mem0ai-0.1.114.tar.gz", hash = "sha256:b27886132eaec78544e8b8b54f0b14a36728f3c99da54cb7cb417150e2fad7e1", size = 113652 }
1268
+ wheels = [
1269
+ { url = "https://files.pythonhosted.org/packages/5e/b7/50d1d1d0600e9e5a861e733644513816011504b9a3d0ba870eadb32a481f/mem0ai-0.1.114-py3-none-any.whl", hash = "sha256:dfb7f0079ee282f5d9782e220f6f09707bcf5e107925d1901dbca30d8dd83f9b", size = 174843 },
1270
+ ]
1271
+
1272
  [[package]]
1273
  name = "multidict"
1274
  version = "6.6.3"
 
1677
  { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538 },
1678
  ]
1679
 
1680
+ [[package]]
1681
+ name = "portalocker"
1682
+ version = "2.10.1"
1683
+ source = { registry = "https://pypi.org/simple" }
1684
+ dependencies = [
1685
+ { name = "pywin32", marker = "sys_platform == 'win32'" },
1686
+ ]
1687
+ sdist = { url = "https://files.pythonhosted.org/packages/ed/d3/c6c64067759e87af98cc668c1cc75171347d0f1577fab7ca3749134e3cd4/portalocker-2.10.1.tar.gz", hash = "sha256:ef1bf844e878ab08aee7e40184156e1151f228f103aa5c6bd0724cc330960f8f", size = 40891 }
1688
+ wheels = [
1689
+ { url = "https://files.pythonhosted.org/packages/9b/fb/a70a4214956182e0d7a9099ab17d50bfcba1056188e9b14f35b9e2b62a0d/portalocker-2.10.1-py3-none-any.whl", hash = "sha256:53a5984ebc86a025552264b459b46a2086e269b21823cb572f8f28ee759e45bf", size = 18423 },
1690
+ ]
1691
+
1692
+ [[package]]
1693
+ name = "posthog"
1694
+ version = "6.0.3"
1695
+ source = { registry = "https://pypi.org/simple" }
1696
+ dependencies = [
1697
+ { name = "backoff" },
1698
+ { name = "distro" },
1699
+ { name = "python-dateutil" },
1700
+ { name = "requests" },
1701
+ { name = "six" },
1702
+ { name = "typing-extensions" },
1703
+ ]
1704
+ sdist = { url = "https://files.pythonhosted.org/packages/39/a2/1b68562124b0d0e615fa8431cc88c84b3db6526275c2c19a419579a49277/posthog-6.0.3.tar.gz", hash = "sha256:9005abb341af8fedd9d82ca0359b3d35a9537555cdc9881bfb469f7c0b4b0ec5", size = 91861 }
1705
+ wheels = [
1706
+ { url = "https://files.pythonhosted.org/packages/ca/f1/a8d86245d41c8686f7d828a4959bdf483e8ac331b249b48b8c61fc884a1c/posthog-6.0.3-py3-none-any.whl", hash = "sha256:4b808c907f3623216a9362d91fdafce8e2f57a8387fb3020475c62ec809be56d", size = 108978 },
1707
+ ]
1708
+
1709
  [[package]]
1710
  name = "prompt-toolkit"
1711
  version = "3.0.51"
 
2213
  { url = "https://files.pythonhosted.org/packages/be/8a/4a3764a68abc02e2fbb0668d225b6fda5cd39586dd099cee8b2ed6ab0452/pyzmq-27.0.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:9df43a2459cd3a3563404c1456b2c4c69564daa7dbaf15724c09821a3329ce46", size = 544726 },
2214
  ]
2215
 
2216
+ [[package]]
2217
+ name = "qdrant-client"
2218
+ version = "1.14.3"
2219
+ source = { registry = "https://pypi.org/simple" }
2220
+ dependencies = [
2221
+ { name = "grpcio" },
2222
+ { name = "httpx", extra = ["http2"] },
2223
+ { name = "numpy" },
2224
+ { name = "portalocker" },
2225
+ { name = "protobuf" },
2226
+ { name = "pydantic" },
2227
+ { name = "urllib3", version = "1.26.20", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.13' or platform_python_implementation == 'PyPy'" },
2228
+ { name = "urllib3", version = "2.5.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'" },
2229
+ ]
2230
+ sdist = { url = "https://files.pythonhosted.org/packages/1d/56/3f355f931c239c260b4fe3bd6433ec6c9e6185cd5ae0970fe89d0ca6daee/qdrant_client-1.14.3.tar.gz", hash = "sha256:bb899e3e065b79c04f5e47053d59176150c0a5dabc09d7f476c8ce8e52f4d281", size = 286766 }
2231
+ wheels = [
2232
+ { url = "https://files.pythonhosted.org/packages/35/5e/8174c845707e60b60b65c58f01e40bbc1d8181b5ff6463f25df470509917/qdrant_client-1.14.3-py3-none-any.whl", hash = "sha256:66faaeae00f9b5326946851fe4ca4ddb1ad226490712e2f05142266f68dfc04d", size = 328969 },
2233
+ ]
2234
+
2235
  [[package]]
2236
  name = "redis"
2237
  version = "5.3.0"