Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d7e16e7

Browse files
get all collections fix
1 parent a5e05c5 commit d7e16e7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎db.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ async def get_collections_from_db(api_key: str, db: mysql.connector.MySQLConnect
6868
"""
6969
else:
7070
query = """
71-
SELECT vc.name, vc.collection_name, vc.embedding_method, vc.description, vc.overview
71+
SELECT vc.name, vc.collection_name, vc.embedding_method, vc.description, vc.overview, vc.is_active
7272
FROM _users u
7373
INNER JOIN _vector_chat_api_keys vcak
7474
ON u.user_id = vcak.user_id
7575
INNER JOIN _vector_collections vc
7676
ON u.user_id = vc.user_id AND vc.is_active = 1
77-
WHERE vcak.api_key = %s AND vcak.is_active = 1
77+
WHERE vcak.api_key = %s
7878
"""
7979
cursor.execute(query, (api_key,))
8080

‎server/main.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ async def get_all_collections_from_db(
126126
db = Depends(get_db),
127127
):
128128
try:
129-
collections = await get_all_collections_from_db(api_key, db=db)
129+
collections = await get_all_collections_from_db(api_key, db=db, return_only_names_and_overviews=False)
130130
return GetAllCollectionsResponse(collections=collections)
131131
except Exception as e:
132132
print("Error:", e)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /