Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 59 additions & 59 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,8 @@
"tsx": "^4.23.0",
"typescript": "^5.0.4",
"vitest": "^3.2.7"
},
"overrides": {
"adm-zip": "^0.6.0"
}
}
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ const progressBar = new cliProgress.SingleBar(
const indexName = getEnv("PINECONE_INDEX");
const indexCloud = getEnv("PINECONE_CLOUD");
const indexRegion = getEnv("PINECONE_REGION");
const pinecone = new Pinecone();
const pinecone = new Pinecone({
apiKey: getEnv("PINECONE_API_KEY"),
sourceTag: "pinecone:recommender_example_typescript",
});

// Yields the records in `chunkSize` batches, wrapping each one in a `Document`
// that carries the article text (`pageContent`) plus the chosen metadata fields.
Expand Down
5 changes: 4 additions & 1 deletion src/recommend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ async function main() {
validateEnvironmentVariables();

const indexName = getEnv("PINECONE_INDEX");
const pinecone = new Pinecone();
const pinecone = new Pinecone({
apiKey: getEnv("PINECONE_API_KEY"),
sourceTag: "pinecone:recommender_example_typescript",
});

// Ensure the index exists and is ready before we query it.
try {
Expand Down
Loading