-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚀 feat: Add Atlas MongoDB as an option for Vector Store #21
Changes from 3 commits
3e7bf23
94a3c9d
e8c280d
a2f5795
c8fff9b
745bf66
14bb666
ea221da
49518de
f554f22
aef8a3d
c92940d
5c03391
07d0c7d
5bd769d
5829299
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,8 @@ | |
) | ||
|
||
from models import DocumentResponse, StoreDocument, QueryRequestBody, QueryMultipleBody | ||
from psql import PSQLDatabase, ensure_custom_id_index_on_embedding, \ | ||
pg_health_check | ||
# from psql import PSQLDatabase, ensure_custom_id_index_on_embedding, \ | ||
# pg_health_check | ||
from middleware import security_middleware | ||
from pgvector_routes import router as pgvector_router | ||
from parsers import process_documents | ||
|
@@ -57,8 +57,8 @@ | |
@asynccontextmanager | ||
async def lifespan(app: FastAPI): | ||
# Startup logic goes here | ||
await PSQLDatabase.get_pool() # Initialize the pool | ||
await ensure_custom_id_index_on_embedding() | ||
# await PSQLDatabase.get_pool() # Initialize the pool | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know it's draft but here would be good to also initialize differently, could probably import functions from a different module There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can start working on a async implementation of the MongoDB code and that might be a good time to do these things There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
awesome thanks for doing that! |
||
# await ensure_custom_id_index_on_embedding() | ||
|
||
yield | ||
|
||
|
@@ -95,7 +95,8 @@ async def get_all_ids(): | |
|
||
|
||
def isHealthOK(): | ||
return pg_health_check() | ||
# return pg_health_check() | ||
return True | ||
|
||
|
||
@app.get("/health") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know this is draft but some way to initialize one or the other would be good