Skip to content

Commit

Permalink
Merge pull request #1674 from RoadieHQ/23067-make-docs-filterable-on-…
Browse files Browse the repository at this point in the history
…rag-ai

Make Tech Docs Embeddings filterable
  • Loading branch information
Xantier authored Oct 15, 2024
2 parents 54ec926 + ad1565e commit ea08cae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/small-clocks-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@roadiehq/rag-ai-backend-retrieval-augmenter': minor
---

Make Tech Docs embeddings creation filterable based on additional passed in entity filter values.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class DefaultVectorAugmentationIndexer implements AugmentationIndexer {

const entitiesResponse = await this.catalogApi.getEntities(
{
filter: TECHDOCS_ENTITY_FILTER,
filter: { ...TECHDOCS_ENTITY_FILTER, ...filter },
},
{ token },
);
Expand Down Expand Up @@ -275,7 +275,9 @@ export class DefaultVectorAugmentationIndexer implements AugmentationIndexer {
});

const entityFilter =
source === 'tech-docs' ? TECHDOCS_ENTITY_FILTER : filter;
source === 'tech-docs'
? { ...TECHDOCS_ENTITY_FILTER, ...filter }
: filter;
const entities = (
await this.catalogApi.getEntities({ filter: entityFilter }, { token })
).items.map(stringifyEntityRef);
Expand Down

0 comments on commit ea08cae

Please sign in to comment.