Skip to content

Commit

Permalink
fix: Added logs of env
Browse files Browse the repository at this point in the history
  • Loading branch information
asafgardin committed Dec 4, 2024
1 parent 9cccbc9 commit 9de0844
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions examples/studio/conversational-rag/rag-engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ async function uploadGetUpdateDelete(fileInput, path) {
console.log('Starting file deletion...');
await client.files.delete(uploadFileResponse.fileId);
console.log('✓ File deletion completed');

// Add buffer time between operations
await sleep(2000);

} catch (error) {
console.error('❌ Error in uploadGetUpdateDelete:', error);
throw error;
Expand All @@ -76,6 +75,15 @@ const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'u
if (isBrowser) {
console.log('Cannot run upload examples in Browser environment');
} else {
/* Log environment details */
console.log('=== Environment Information ===');
console.log(`Node.js Version: ${process.version}`);
console.log(`Platform: ${process.platform}`);
console.log(`Architecture: ${process.arch}`);
console.log(`Process ID: ${process.pid}`);
console.log(`Current Working Directory: ${process.cwd()}`);
console.log('===========================\n');

/* Run all operations sequentially */
(async () => {
try {
Expand Down

0 comments on commit 9de0844

Please sign in to comment.