mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-17 03:04:20 +00:00
fix: 4355f0fa78 ruff lint
This commit is contained in:
@@ -338,9 +338,7 @@ class PgVectorDatabase(VectorDatabase):
|
||||
)
|
||||
|
||||
count_stmt = (
|
||||
select(func.count())
|
||||
.select_from(PgVectorEntry)
|
||||
.filter(PgVectorEntry.collection == collection)
|
||||
select(func.count()).select_from(PgVectorEntry).filter(PgVectorEntry.collection == collection)
|
||||
)
|
||||
|
||||
if filter:
|
||||
@@ -356,15 +354,17 @@ class PgVectorDatabase(VectorDatabase):
|
||||
|
||||
items = []
|
||||
for row in rows:
|
||||
items.append({
|
||||
'id': row.id,
|
||||
'document': row.text or '',
|
||||
'metadata': {
|
||||
'text': row.text or '',
|
||||
'file_id': row.file_id or '',
|
||||
'uuid': row.chunk_uuid or '',
|
||||
},
|
||||
})
|
||||
items.append(
|
||||
{
|
||||
'id': row.id,
|
||||
'document': row.text or '',
|
||||
'metadata': {
|
||||
'text': row.text or '',
|
||||
'file_id': row.file_id or '',
|
||||
'uuid': row.chunk_uuid or '',
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
return items, total
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user