Add list_collection and db path
Browse files
main.py
CHANGED
@@ -40,6 +40,10 @@ def heartbeat():
|
|
40 |
print("Received heartbeat request")
|
41 |
return bkend.heartbeat()
|
42 |
|
|
|
|
|
|
|
|
|
43 |
|
44 |
if __name__ == "__main__":
|
45 |
uvicorn.run(app, host="0.0.0.0", port=8000)
|
|
|
40 |
print("Received heartbeat request")
|
41 |
return bkend.heartbeat()
|
42 |
|
43 |
+
@app.get(api_base+"/collection")
|
44 |
+
def list_collection():
|
45 |
+
print("Received list_collection request")
|
46 |
+
return bkend.list_collections()
|
47 |
|
48 |
if __name__ == "__main__":
|
49 |
uvicorn.run(app, host="0.0.0.0", port=8000)
|
server.py
CHANGED
@@ -6,7 +6,7 @@ class client():
|
|
6 |
def __init__(self):
|
7 |
self.db = chromadb.Client(Settings(
|
8 |
chroma_db_impl="duckdb+parquet",
|
9 |
-
persist_directory="/
|
10 |
))
|
11 |
|
12 |
def heartbeat(self):
|
|
|
6 |
def __init__(self):
|
7 |
self.db = chromadb.Client(Settings(
|
8 |
chroma_db_impl="duckdb+parquet",
|
9 |
+
persist_directory="./index/chroma" # Optional, defaults to .chromadb/ in the current directory
|
10 |
))
|
11 |
|
12 |
def heartbeat(self):
|