Skip to content

Commit

Permalink
upgrade auto-drive pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
Xm0onh committed Feb 3, 2025
1 parent 76a8b63 commit 7820686
Show file tree
Hide file tree
Showing 4 changed files with 586 additions and 15 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"dependencies": {
"@autonomys/auto-dag-data": "1.2.1",
"@autonomys/auto-drive": "1.2.1",
"@autonomys/auto-drive": "1.2.3",
"@autonomys/auto-utils": "^1.2.3",
"@langchain/anthropic": "^0.3.11",
"@langchain/community": "0.3.20",
"@langchain/core": "^0.3.27",
Expand All @@ -33,9 +34,9 @@
"better-sqlite3": "^11.8.0",
"dotenv": "^16.3.1",
"ethers": "^6.13.4",
"inquirer": "^10.2.0",
"sqlite3": "^5.1.7",
"vectorlite": "^0.2.0",
"inquirer": "^10.2.0",
"winston": "^3.11.0",
"zod": "^3.22.4",
"zod-to-json-schema": "^3.24.1"
Expand Down
2 changes: 2 additions & 0 deletions src/agents/tools/utils/dsn/dsnDownload.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createAutoDriveApi, downloadFile } from '@autonomys/auto-drive';
import { NetworkId } from '@autonomys/auto-utils';
import { config } from '../../../../config/index.js';
import { createLogger } from '../../../../utils/logger.js';
import { withRetry } from './retry.js';
Expand All @@ -17,6 +18,7 @@ export const download = async (cid: string): Promise<BaseMemory> => {
async () => {
const api = createAutoDriveApi({
apiKey: config.autoDriveConfig.AUTO_DRIVE_API_KEY || '',
network: NetworkId.TAURUS,
});
logger.info(`Downloading file: ${cid}`);
const stream = await downloadFile(api, cid);
Expand Down
6 changes: 5 additions & 1 deletion src/agents/tools/utils/dsn/dsnUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ import { agentVersion, config } from '../../../../config/index.js';
import { signMessage, wallet } from '../blockchain/agentWallet.js';
import { getLastMemoryCid, setLastMemoryHash } from '../blockchain/agentMemoryContract.js';
import { withRetry } from './retry.js';
import { NetworkId } from '@autonomys/auto-utils';

const logger = createLogger('dsn-upload-tool');
const dsnApi = createAutoDriveApi({ apiKey: config.autoDriveConfig.AUTO_DRIVE_API_KEY || '' });
const dsnApi = createAutoDriveApi({
apiKey: config.autoDriveConfig.AUTO_DRIVE_API_KEY || '',
network: NetworkId.TAURUS,
});

let currentNonce = await wallet.getNonce();

Expand Down
Loading

0 comments on commit 7820686

Please sign in to comment.