Skip to content

Commit

Permalink
Adjusted context token window
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterbryant committed Mar 8, 2024
1 parent fd88713 commit 5f05096
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/utilities/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type Metadata = {
export const getContext = async (
message: string,
namespace: string,
maxTokens = 3000,
maxTokens = 10000,
minScore = 0.5,
getOnlyText = true
): Promise<string | ScoredVector[]> => {
Expand All @@ -28,7 +28,7 @@ export const getContext = async (


// Retrieve the matches for the embeddings from the specified namespace
const matches = await getMatchesFromEmbeddings(embedding, 5, namespace);
const matches = await getMatchesFromEmbeddings(embedding, 10, namespace);

// Filter out the matches that have a score lower than the minimum score
const qualifyingDocs = matches.filter((m) => m.score && m.score > minScore);
Expand Down

0 comments on commit 5f05096

Please sign in to comment.