Skip to content

Commit

Permalink
only provide unique sources
Browse files Browse the repository at this point in the history
  • Loading branch information
adhityan committed Feb 2, 2024
1 parent 490b71c commit a1c95b6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@llm-tools/embedjs",
"version": "0.0.51",
"version": "0.0.53",
"description": "A NodeJS RAG framework to easily work with LLMs and custom datasets",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/core/llm-application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class LLMApplication {
sources: string[];
}> {
const context = await this.getContext(userQuery);
const sources = context.supportingContext.map((chunk) => chunk.metadata.source);
const sources = [...new Set(context.supportingContext.map((chunk) => chunk.metadata.source))];

return {
sources,
Expand Down
2 changes: 1 addition & 1 deletion src/loaders/confluence-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class ConfluenceLoader extends BaseLoader<{ type: 'ConfluenceLoader' }> {
contentHash: result.contentHash,
metadata: {
type: <'ConfluenceLoader'>'ConfluenceLoader',
source: `${this.confluenceBaseUrl}${content._links.webui}`,
source: `${this.confluenceBaseUrl}/wiki${content._links.webui}`,
},
};
}
Expand Down

0 comments on commit a1c95b6

Please sign in to comment.