Skip to content

Commit

Permalink
Merge pull request #1399 from Oneirocom/docfix
Browse files Browse the repository at this point in the history
Fixed document retrieval - it always grabbed first
  • Loading branch information
benbot authored Nov 28, 2023
2 parents e6771ee + bcc3adf commit 913018f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class DocumentService<

const querys = await db('documents')
.joinRaw(
'inner join embeddings on documents.id = embeddings."documentId" and embeddings.index = 0'
'inner join embeddings on documents.id = embeddings."documentId"'
)
// .innerJoin('embeddings', 'documents.id', '=', 'embeddings.documentId')
.select(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ function DocumentTable({ documents, updateCallback }) {
fetch(`${API_ROOT_URL}/documents/${doc}`, {
method: 'GET',
headers: {
$limit: '1',
Authorization: `Bearer ${token}`,
},
})
Expand Down

0 comments on commit 913018f

Please sign in to comment.