XThomasBU
commited on
Commit
·
6064b0b
1
Parent(s):
3bc02c2
added console_script for vectore store creation
Browse files- edubotics_core/vectorstore/store_manager.py +7 -4
- setup.py +5 -0
edubotics_core/vectorstore/store_manager.py
CHANGED
|
@@ -7,6 +7,8 @@ import logging
|
|
| 7 |
import os
|
| 8 |
import time
|
| 9 |
import asyncio
|
|
|
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
class VectorStoreManager:
|
|
@@ -162,10 +164,7 @@ class VectorStoreManager:
|
|
| 162 |
return len(self.vector_db)
|
| 163 |
|
| 164 |
|
| 165 |
-
|
| 166 |
-
import yaml
|
| 167 |
-
import argparse
|
| 168 |
-
|
| 169 |
# Add argument parsing for config files
|
| 170 |
parser = argparse.ArgumentParser(description="Load configuration files.")
|
| 171 |
parser.add_argument(
|
|
@@ -216,3 +215,7 @@ if __name__ == "__main__":
|
|
| 216 |
print("Loaded database")
|
| 217 |
|
| 218 |
print(f"View the logs at {config['log_dir']}/vector_db.log")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
import os
|
| 8 |
import time
|
| 9 |
import asyncio
|
| 10 |
+
import yaml
|
| 11 |
+
import argparse
|
| 12 |
|
| 13 |
|
| 14 |
class VectorStoreManager:
|
|
|
|
| 164 |
return len(self.vector_db)
|
| 165 |
|
| 166 |
|
| 167 |
+
def main():
|
|
|
|
|
|
|
|
|
|
| 168 |
# Add argument parsing for config files
|
| 169 |
parser = argparse.ArgumentParser(description="Load configuration files.")
|
| 170 |
parser.add_argument(
|
|
|
|
| 215 |
print("Loaded database")
|
| 216 |
|
| 217 |
print(f"View the logs at {config['log_dir']}/vector_db.log")
|
| 218 |
+
|
| 219 |
+
|
| 220 |
+
if __name__ == "__main__":
|
| 221 |
+
main()
|
setup.py
CHANGED
|
@@ -20,4 +20,9 @@ setup(
|
|
| 20 |
license="MIT",
|
| 21 |
long_description=readme,
|
| 22 |
long_description_content_type="text/markdown",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
)
|
|
|
|
| 20 |
license="MIT",
|
| 21 |
long_description=readme,
|
| 22 |
long_description_content_type="text/markdown",
|
| 23 |
+
entry_points={
|
| 24 |
+
"console_scripts": [
|
| 25 |
+
"vectorstore_creator=edubotics_core.vectorstore.store_manager:main",
|
| 26 |
+
],
|
| 27 |
+
},
|
| 28 |
)
|