Skip to content

Commit

Permalink
Merge pull request #8 from upstash/hotfix-use-embedding-ids-in-context
Browse files Browse the repository at this point in the history
HOTFIX: Use embedding ids in context instead of a numerical index
  • Loading branch information
CahidArda authored Jun 6, 2024
2 parents a093884 + d898330 commit df05782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class Database {
const facts = result
.filter((x) => x.score >= similarityThreshold)
.map(
(embedding, index) => `- Context Item ${index}: ${embedding.metadata?.[metadataKey] ?? ""}`
(embedding) => `- ${embedding.metadata?.[metadataKey] ?? ""}`
);
return formatFacts(facts);
}
Expand Down

0 comments on commit df05782

Please sign in to comment.