diff --git a/packages/client-discord/src/messages.ts b/packages/client-discord/src/messages.ts index 1c276b65f0e..9c5bf3f21c9 100644 --- a/packages/client-discord/src/messages.ts +++ b/packages/client-discord/src/messages.ts @@ -612,7 +612,7 @@ export class MessageManager { const response = await generateMessageResponse({ runtime: this.runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); if (!response) { diff --git a/packages/client-farcaster/src/interactions.ts b/packages/client-farcaster/src/interactions.ts index f48b49dbb14..7cb82cb4c50 100644 --- a/packages/client-farcaster/src/interactions.ts +++ b/packages/client-farcaster/src/interactions.ts @@ -188,7 +188,7 @@ export class FarcasterInteractionManager { const response = await generateMessageResponse({ runtime: this.runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); response.inReplyTo = memoryId; diff --git a/packages/client-telegram/src/messageManager.ts b/packages/client-telegram/src/messageManager.ts index 10a3d233dce..8eb9154f242 100644 --- a/packages/client-telegram/src/messageManager.ts +++ b/packages/client-telegram/src/messageManager.ts @@ -289,7 +289,7 @@ export class MessageManager { const response = await generateMessageResponse({ runtime: this.runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); if (!response) { diff --git a/packages/plugin-0g/src/actions/upload.ts b/packages/plugin-0g/src/actions/upload.ts index df73269e486..d4d4e702775 100644 --- a/packages/plugin-0g/src/actions/upload.ts +++ b/packages/plugin-0g/src/actions/upload.ts @@ -71,7 +71,7 @@ export const zgUpload: Action = { const content = await generateObjectV2({ runtime, context: uploadContext, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); // Validate upload content diff --git a/packages/plugin-bootstrap/src/actions/continue.ts b/packages/plugin-bootstrap/src/actions/continue.ts index 3e2d95e0ee3..db365d93238 100644 --- a/packages/plugin-bootstrap/src/actions/continue.ts +++ b/packages/plugin-bootstrap/src/actions/continue.ts @@ -138,7 +138,7 @@ export const continueAction: Action = { const response = await generateMessageResponse({ runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); response.inReplyTo = message.id; diff --git a/packages/plugin-bootstrap/src/actions/followRoom.ts b/packages/plugin-bootstrap/src/actions/followRoom.ts index b08a850ad9d..2708c39913a 100644 --- a/packages/plugin-bootstrap/src/actions/followRoom.ts +++ b/packages/plugin-bootstrap/src/actions/followRoom.ts @@ -15,9 +15,9 @@ export const shouldFollowTemplate = {{recentMessages}} -Should {{agentName}} start following this room, eagerly participating without explicit mentions? +Should {{agentName}} start following this room, eagerly participating without explicit mentions? Respond with YES if: -- The user has directly asked {{agentName}} to follow the conversation or participate more actively +- The user has directly asked {{agentName}} to follow the conversation or participate more actively - The conversation topic is highly engaging and {{agentName}}'s input would add significant value - {{agentName}} has unique insights to contribute and the users seem receptive @@ -67,7 +67,7 @@ export const followRoomAction: Action = { const response = await generateTrueOrFalse({ runtime, context: shouldFollowContext, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); return response; diff --git a/packages/plugin-bootstrap/src/actions/muteRoom.ts b/packages/plugin-bootstrap/src/actions/muteRoom.ts index c8d71b29ea3..feed9c537df 100644 --- a/packages/plugin-bootstrap/src/actions/muteRoom.ts +++ b/packages/plugin-bootstrap/src/actions/muteRoom.ts @@ -54,7 +54,7 @@ export const muteRoomAction: Action = { const response = await generateTrueOrFalse({ runtime, context: shouldMuteContext, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); return response; diff --git a/packages/plugin-bootstrap/src/actions/unfollowRoom.ts b/packages/plugin-bootstrap/src/actions/unfollowRoom.ts index e151f6270b0..322ea50ba6d 100644 --- a/packages/plugin-bootstrap/src/actions/unfollowRoom.ts +++ b/packages/plugin-bootstrap/src/actions/unfollowRoom.ts @@ -17,7 +17,7 @@ const shouldUnfollowTemplate = Should {{agentName}} stop closely following this previously followed room and only respond when mentioned? Respond with YES if: -- The user has suggested that {{agentName}} is over-participating or being disruptive +- The user has suggested that {{agentName}} is over-participating or being disruptive - {{agentName}}'s eagerness to contribute is not well-received by the users - The conversation has shifted to a topic where {{agentName}} has less to add @@ -52,7 +52,7 @@ export const unfollowRoomAction: Action = { const response = await generateTrueOrFalse({ runtime, context: shouldUnfollowContext, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); return response; diff --git a/packages/plugin-bootstrap/src/actions/unmuteRoom.ts b/packages/plugin-bootstrap/src/actions/unmuteRoom.ts index 78095c8b8f0..2282f6e4a21 100644 --- a/packages/plugin-bootstrap/src/actions/unmuteRoom.ts +++ b/packages/plugin-bootstrap/src/actions/unmuteRoom.ts @@ -13,10 +13,10 @@ import { export const shouldUnmuteTemplate = `Based on the conversation so far: -{{recentMessages}} +{{recentMessages}} Should {{agentName}} unmute this previously muted room and start considering it for responses again? -Respond with YES if: +Respond with YES if: - The user has explicitly asked {{agentName}} to start responding again - The user seems to want to re-engage with {{agentName}} in a respectful manner - The tone of the conversation has improved and {{agentName}}'s input would be welcome @@ -52,7 +52,7 @@ export const unmuteRoomAction: Action = { const response = generateTrueOrFalse({ context: shouldUnmuteContext, runtime, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); return response; diff --git a/packages/plugin-bootstrap/src/evaluators/fact.ts b/packages/plugin-bootstrap/src/evaluators/fact.ts index 78e87f5455a..02ac5e436d8 100644 --- a/packages/plugin-bootstrap/src/evaluators/fact.ts +++ b/packages/plugin-bootstrap/src/evaluators/fact.ts @@ -64,7 +64,7 @@ async function handler(runtime: IAgentRuntime, message: Memory) { const facts = await generateObjectArray({ runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); const factsManager = new MemoryManager({ diff --git a/packages/plugin-bootstrap/src/evaluators/goal.ts b/packages/plugin-bootstrap/src/evaluators/goal.ts index 54d4574b6d8..b06742c3193 100644 --- a/packages/plugin-bootstrap/src/evaluators/goal.ts +++ b/packages/plugin-bootstrap/src/evaluators/goal.ts @@ -72,7 +72,7 @@ async function handler( const response = await generateText({ runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); // Parse the JSON response to extract goal updates @@ -160,12 +160,12 @@ export const goalEvaluator: Evaluator = { context: `Actors in the scene: {{user1}}: An avid reader and member of a book club. {{user2}}: The organizer of the book club. - + Goals: - Name: Finish reading "War and Peace" id: 12345-67890-12345-67890 Status: IN_PROGRESS - Objectives: + Objectives: - Read up to chapter 20 by the end of the month - Discuss the first part in the next meeting`, @@ -206,12 +206,12 @@ export const goalEvaluator: Evaluator = { context: `Actors in the scene: {{user1}}: A fitness enthusiast working towards a marathon. {{user2}}: A personal trainer. - + Goals: - Name: Complete a marathon id: 23456-78901-23456-78901 Status: IN_PROGRESS - Objectives: + Objectives: - Increase running distance to 30 miles a week - Complete a half-marathon as practice`, @@ -249,12 +249,12 @@ export const goalEvaluator: Evaluator = { context: `Actors in the scene: {{user1}}: A student working on a final year project. {{user2}}: The project supervisor. - + Goals: - Name: Finish the final year project id: 34567-89012-34567-89012 Status: IN_PROGRESS - Objectives: + Objectives: - Submit the first draft of the thesis - Complete the project prototype`, @@ -294,12 +294,12 @@ export const goalEvaluator: Evaluator = { context: `Actors in the scene: {{user1}}: A project manager working on a software development project. {{user2}}: A software developer in the project team. - + Goals: - Name: Launch the new software version id: 45678-90123-45678-90123 Status: IN_PROGRESS - Objectives: + Objectives: - Complete the coding for the new features - Perform comprehensive testing of the software`, diff --git a/packages/plugin-coinbase/src/plugins/commerce.ts b/packages/plugin-coinbase/src/plugins/commerce.ts index 81a8c1055e3..d1ef2527873 100644 --- a/packages/plugin-coinbase/src/plugins/commerce.ts +++ b/packages/plugin-coinbase/src/plugins/commerce.ts @@ -147,7 +147,7 @@ export const createCoinbaseChargeAction: Action = { const chargeDetails = await generateObjectV2({ runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, schema: ChargeSchema, }); if (!isChargeContent(chargeDetails.object)) { @@ -344,7 +344,7 @@ export const getChargeDetailsAction: Action = { const chargeDetails = await generateObjectV2({ runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, schema: ChargeSchema, }); if (!isChargeContent(chargeDetails.object)) { diff --git a/packages/plugin-coinbase/src/plugins/massPayments.ts b/packages/plugin-coinbase/src/plugins/massPayments.ts index c70836408b2..0b8751550f1 100644 --- a/packages/plugin-coinbase/src/plugins/massPayments.ts +++ b/packages/plugin-coinbase/src/plugins/massPayments.ts @@ -25,7 +25,13 @@ import path from "path"; import { fileURLToPath } from "url"; import fs from "fs"; import { createArrayCsvWriter } from "csv-writer"; -import { appendTransactionsToCsv, executeTransfer, getCharityAddress, getWalletDetails, initializeWallet } from "../utils"; +import { + appendTransactionsToCsv, + executeTransfer, + getCharityAddress, + getWalletDetails, + initializeWallet, +} from "../utils"; // Dynamically resolve the file path to the src/plugins directory const __filename = fileURLToPath(import.meta.url); @@ -134,7 +140,12 @@ async function executeMassPayout( } // Execute the transfer - const transfer = await executeTransfer(sendingWallet, transferAmount, assetIdLowercase, address); + const transfer = await executeTransfer( + sendingWallet, + transferAmount, + assetIdLowercase, + address + ); transactions.push({ address, @@ -143,7 +154,6 @@ async function executeMassPayout( errorCode: null, transactionUrl: transfer.getTransactionLink(), }); - } catch (error) { elizaLogger.error( "Error during transfer for address:", @@ -171,7 +181,12 @@ async function executeMassPayout( } // Send 1% to charity const charityAddress = getCharityAddress(networkId); - const charityTransfer = await executeTransfer(sendingWallet, transferAmount * 0.01, assetId, charityAddress); + const charityTransfer = await executeTransfer( + sendingWallet, + transferAmount * 0.01, + assetId, + charityAddress + ); transactions.push({ address: charityAddress, amount: charityTransfer.getAmount().toNumber(), @@ -243,7 +258,7 @@ export const sendMassPayoutAction: Action = { const transferDetails = await generateObjectV2({ runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, schema: TransferSchema, }); diff --git a/packages/plugin-coinbase/src/plugins/tokenContract.ts b/packages/plugin-coinbase/src/plugins/tokenContract.ts index 66fe7858839..f5a0612c566 100644 --- a/packages/plugin-coinbase/src/plugins/tokenContract.ts +++ b/packages/plugin-coinbase/src/plugins/tokenContract.ts @@ -12,8 +12,16 @@ import { ModelClass, } from "@ai16z/eliza"; import { initializeWallet } from "../utils"; -import { contractInvocationTemplate, tokenContractTemplate } from "../templates"; -import { ContractInvocationSchema, TokenContractSchema, isContractInvocationContent, isTokenContractContent } from "../types"; +import { + contractInvocationTemplate, + tokenContractTemplate, +} from "../templates"; +import { + ContractInvocationSchema, + TokenContractSchema, + isContractInvocationContent, + isTokenContractContent, +} from "../types"; import path from "path"; import { fileURLToPath } from "url"; import { createArrayCsvWriter } from "csv-writer"; @@ -27,15 +35,19 @@ const contractsCsvFilePath = path.join(baseDir, "contracts.csv"); export const deployTokenContractAction: Action = { name: "DEPLOY_TOKEN_CONTRACT", - description: "Deploy an ERC20, ERC721, or ERC1155 token contract using the Coinbase SDK", + description: + "Deploy an ERC20, ERC721, or ERC1155 token contract using the Coinbase SDK", validate: async (runtime: IAgentRuntime, _message: Memory) => { elizaLogger.log("Validating runtime for DEPLOY_TOKEN_CONTRACT..."); - return !!( - runtime.character.settings.secrets?.COINBASE_API_KEY || - process.env.COINBASE_API_KEY - ) && !!( - runtime.character.settings.secrets?.COINBASE_PRIVATE_KEY || - process.env.COINBASE_PRIVATE_KEY + return ( + !!( + runtime.character.settings.secrets?.COINBASE_API_KEY || + process.env.COINBASE_API_KEY + ) && + !!( + runtime.character.settings.secrets?.COINBASE_PRIVATE_KEY || + process.env.COINBASE_PRIVATE_KEY + ) ); }, handler: async ( @@ -49,8 +61,12 @@ export const deployTokenContractAction: Action = { try { Coinbase.configure({ - apiKeyName: runtime.getSetting("COINBASE_API_KEY") ?? process.env.COINBASE_API_KEY, - privateKey: runtime.getSetting("COINBASE_PRIVATE_KEY") ?? process.env.COINBASE_PRIVATE_KEY, + apiKeyName: + runtime.getSetting("COINBASE_API_KEY") ?? + process.env.COINBASE_API_KEY, + privateKey: + runtime.getSetting("COINBASE_PRIVATE_KEY") ?? + process.env.COINBASE_PRIVATE_KEY, }); // Ensure CSV file exists @@ -94,7 +110,14 @@ export const deployTokenContractAction: Action = { return; } - const { contractType, name, symbol, network, baseURI, totalSupply } = contractDetails.object; + const { + contractType, + name, + symbol, + network, + baseURI, + totalSupply, + } = contractDetails.object; elizaLogger.log("Contract details:", contractDetails.object); const wallet = await initializeWallet(runtime, network); let contract: SmartContract; @@ -127,7 +150,9 @@ export const deployTokenContractAction: Action = { }; break; default: - throw new Error(`Unsupported contract type: ${contractType}`); + throw new Error( + `Unsupported contract type: ${contractType}` + ); } // Wait for deployment to complete @@ -149,18 +174,21 @@ export const deployTokenContractAction: Action = { ], append: true, }); - const transaction = contract.getTransaction()?.getTransactionLink() || ""; + const transaction = + contract.getTransaction()?.getTransactionLink() || ""; const contractAddress = contract.getContractAddress(); - await csvWriter.writeRecords([[ - deploymentDetails.contractType, - name, - symbol, - network, - contractAddress, - transaction, - deploymentDetails.baseURI, - deploymentDetails.totalSupply || "", - ]]); + await csvWriter.writeRecords([ + [ + deploymentDetails.contractType, + name, + symbol, + network, + contractAddress, + transaction, + deploymentDetails.baseURI, + deploymentDetails.totalSupply || "", + ], + ]); callback( { @@ -178,7 +206,6 @@ Contract deployment has been logged to the CSV file.`, }, [] ); - } catch (error) { elizaLogger.error("Error deploying token contract:", error); callback( @@ -237,15 +264,19 @@ Contract deployment has been logged to the CSV file.`, // Add to tokenContract.ts export const invokeContractAction: Action = { name: "INVOKE_CONTRACT", - description: "Invoke a method on a deployed smart contract using the Coinbase SDK", + description: + "Invoke a method on a deployed smart contract using the Coinbase SDK", validate: async (runtime: IAgentRuntime, _message: Memory) => { elizaLogger.log("Validating runtime for INVOKE_CONTRACT..."); - return !!( - runtime.character.settings.secrets?.COINBASE_API_KEY || - process.env.COINBASE_API_KEY - ) && !!( - runtime.character.settings.secrets?.COINBASE_PRIVATE_KEY || - process.env.COINBASE_PRIVATE_KEY + return ( + !!( + runtime.character.settings.secrets?.COINBASE_API_KEY || + process.env.COINBASE_API_KEY + ) && + !!( + runtime.character.settings.secrets?.COINBASE_PRIVATE_KEY || + process.env.COINBASE_PRIVATE_KEY + ) ); }, handler: async ( @@ -259,8 +290,12 @@ export const invokeContractAction: Action = { try { Coinbase.configure({ - apiKeyName: runtime.getSetting("COINBASE_API_KEY") ?? process.env.COINBASE_API_KEY, - privateKey: runtime.getSetting("COINBASE_PRIVATE_KEY") ?? process.env.COINBASE_PRIVATE_KEY, + apiKeyName: + runtime.getSetting("COINBASE_API_KEY") ?? + process.env.COINBASE_API_KEY, + privateKey: + runtime.getSetting("COINBASE_PRIVATE_KEY") ?? + process.env.COINBASE_PRIVATE_KEY, }); const context = composeContext({ @@ -271,7 +306,7 @@ export const invokeContractAction: Action = { const invocationDetails = await generateObjectV2({ runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, schema: ContractInvocationSchema, }); elizaLogger.log("Invocation details:", invocationDetails.object); @@ -285,7 +320,8 @@ export const invokeContractAction: Action = { return; } - const { contractAddress, method, args, amount, assetId, network } = invocationDetails.object; + const { contractAddress, method, args, amount, assetId, network } = + invocationDetails.object; const wallet = await initializeWallet(runtime, network); @@ -295,225 +331,225 @@ export const invokeContractAction: Action = { method, abi: [ { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ + constant: true, + inputs: [], + name: "name", + outputs: [ { - "name": "", - "type": "string" - } + name: "", + type: "string", + }, ], - "payable": false, - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", }, { - "constant": false, - "inputs": [ + constant: false, + inputs: [ { - "name": "_spender", - "type": "address" + name: "_spender", + type: "address", }, { - "name": "_value", - "type": "uint256" - } + name: "_value", + type: "uint256", + }, ], - "name": "approve", - "outputs": [ + name: "approve", + outputs: [ { - "name": "", - "type": "bool" - } + name: "", + type: "bool", + }, ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ { - "name": "", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "payable": false, - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", }, { - "constant": false, - "inputs": [ + constant: false, + inputs: [ { - "name": "_from", - "type": "address" + name: "_from", + type: "address", }, { - "name": "_to", - "type": "address" + name: "_to", + type: "address", }, { - "name": "_value", - "type": "uint256" - } + name: "_value", + type: "uint256", + }, ], - "name": "transferFrom", - "outputs": [ + name: "transferFrom", + outputs: [ { - "name": "", - "type": "bool" - } + name: "", + type: "bool", + }, ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ + constant: true, + inputs: [], + name: "decimals", + outputs: [ { - "name": "", - "type": "uint8" - } + name: "", + type: "uint8", + }, ], - "payable": false, - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", }, { - "constant": true, - "inputs": [ + constant: true, + inputs: [ { - "name": "_owner", - "type": "address" - } + name: "_owner", + type: "address", + }, ], - "name": "balanceOf", - "outputs": [ + name: "balanceOf", + outputs: [ { - "name": "balance", - "type": "uint256" - } + name: "balance", + type: "uint256", + }, ], - "payable": false, - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", }, { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ + constant: true, + inputs: [], + name: "symbol", + outputs: [ { - "name": "", - "type": "string" - } + name: "", + type: "string", + }, ], - "payable": false, - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", }, { - "constant": false, - "inputs": [ + constant: false, + inputs: [ { - "name": "_to", - "type": "address" + name: "_to", + type: "address", }, { - "name": "_value", - "type": "uint256" - } + name: "_value", + type: "uint256", + }, ], - "name": "transfer", - "outputs": [ + name: "transfer", + outputs: [ { - "name": "", - "type": "bool" - } + name: "", + type: "bool", + }, ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "constant": true, - "inputs": [ + constant: true, + inputs: [ { - "name": "_owner", - "type": "address" + name: "_owner", + type: "address", }, { - "name": "_spender", - "type": "address" - } + name: "_spender", + type: "address", + }, ], - "name": "allowance", - "outputs": [ + name: "allowance", + outputs: [ { - "name": "", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "payable": false, - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", }, { - "payable": true, - "stateMutability": "payable", - "type": "fallback" + payable: true, + stateMutability: "payable", + type: "fallback", }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "name": "owner", - "type": "address" + indexed: true, + name: "owner", + type: "address", }, { - "indexed": true, - "name": "spender", - "type": "address" + indexed: true, + name: "spender", + type: "address", }, { - "indexed": false, - "name": "value", - "type": "uint256" - } + indexed: false, + name: "value", + type: "uint256", + }, ], - "name": "Approval", - "type": "event" + name: "Approval", + type: "event", }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "name": "from", - "type": "address" + indexed: true, + name: "from", + type: "address", }, { - "indexed": true, - "name": "to", - "type": "address" + indexed: true, + name: "to", + type: "address", }, { - "indexed": false, - "name": "value", - "type": "uint256" - } + indexed: false, + name: "value", + type: "uint256", + }, ], - "name": "Transfer", - "type": "event" - } + name: "Transfer", + type: "event", + }, ], args, ...(amount && assetId ? { amount, assetId } : {}), @@ -540,15 +576,17 @@ export const invokeContractAction: Action = { append: true, }); - await csvWriter.writeRecords([[ - contractAddress, - method, - network, - invocation.getStatus(), - invocation.getTransactionLink() || "", - amount || "", - assetId || "", - ]]); + await csvWriter.writeRecords([ + [ + contractAddress, + method, + network, + invocation.getStatus(), + invocation.getTransactionLink() || "", + amount || "", + assetId || "", + ], + ]); callback( { @@ -565,7 +603,6 @@ Contract invocation has been logged to the CSV file.`, }, [] ); - } catch (error) { elizaLogger.error("Error invoking contract method:", error); callback( @@ -606,6 +643,7 @@ Contract invocation has been logged to the CSV file.`, export const tokenContractPlugin: Plugin = { name: "tokenContract", - description: "Enables deployment and invoking of ERC20, ERC721, and ERC1155 token contracts using the Coinbase SDK", + description: + "Enables deployment and invoking of ERC20, ERC721, and ERC1155 token contracts using the Coinbase SDK", actions: [deployTokenContractAction], -}; \ No newline at end of file +}; diff --git a/packages/plugin-coinbase/src/plugins/trade.ts b/packages/plugin-coinbase/src/plugins/trade.ts index 0775fa956aa..9d22824873a 100644 --- a/packages/plugin-coinbase/src/plugins/trade.ts +++ b/packages/plugin-coinbase/src/plugins/trade.ts @@ -1,4 +1,4 @@ -import { Coinbase} from "@coinbase/coinbase-sdk"; +import { Coinbase } from "@coinbase/coinbase-sdk"; import { Action, Plugin, @@ -22,7 +22,6 @@ import { fileURLToPath } from "url"; import fs from "fs"; import { createArrayCsvWriter } from "csv-writer"; - // Dynamically resolve the file path to the src/plugins directory const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); @@ -136,7 +135,7 @@ export const executeTradeAction: Action = { const tradeDetails = await generateObjectV2({ runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, schema: TradeSchema, }); @@ -165,7 +164,13 @@ export const executeTradeAction: Action = { ); return; } - const { trade, transfer } = await executeTradeAndCharityTransfer(runtime, network, amount, sourceAsset, targetAsset); + const { trade, transfer } = await executeTradeAndCharityTransfer( + runtime, + network, + amount, + sourceAsset, + targetAsset + ); callback( { text: `Trade executed successfully: @@ -264,4 +269,3 @@ export const tradePlugin: Plugin = { actions: [executeTradeAction], providers: [tradeProvider], }; - diff --git a/packages/plugin-conflux/src/actions/bridgeTransfer.ts b/packages/plugin-conflux/src/actions/bridgeTransfer.ts index ab2907bc818..8b34817c1b9 100644 --- a/packages/plugin-conflux/src/actions/bridgeTransfer.ts +++ b/packages/plugin-conflux/src/actions/bridgeTransfer.ts @@ -120,7 +120,7 @@ export const bridgeTransfer: Action = { const content = await generateObjectV2({ runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, schema: TransferSchema, }); diff --git a/packages/plugin-goat/src/actions.ts b/packages/plugin-goat/src/actions.ts index a69ab6378e6..d58f124926b 100644 --- a/packages/plugin-goat/src/actions.ts +++ b/packages/plugin-goat/src/actions.ts @@ -144,7 +144,7 @@ async function generateParameters( const { object } = await generateObjectV2({ runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, schema: tool.parameters, }); @@ -195,6 +195,6 @@ async function generateResponse( return generateText({ runtime, context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); } diff --git a/packages/plugin-icp/src/actions/createToken.ts b/packages/plugin-icp/src/actions/createToken.ts index b7d523ef7de..1aacf72cd6e 100644 --- a/packages/plugin-icp/src/actions/createToken.ts +++ b/packages/plugin-icp/src/actions/createToken.ts @@ -20,17 +20,14 @@ import { unwrapOption, wrapOption } from "../utils/common/types/options"; import { unwrapRustResultMap } from "../utils/common/types/results"; import { icpWalletProvider } from "../providers/wallet"; import { uploadFileToWeb3Storage } from "../apis/uploadFile"; -import { createTokenTemplate, logoPromptTemplate } from './prompts/token'; -import { CANISTER_IDS } from '../constants/canisters'; +import { createTokenTemplate, logoPromptTemplate } from "./prompts/token"; +import { CANISTER_IDS } from "../constants/canisters"; async function createTokenTransaction( creator: ActorCreator, tokenInfo: CreateMemeTokenArg ) { - const actor: _SERVICE = await creator( - idlFactory, - CANISTER_IDS.PICK_PUMP - ); + const actor: _SERVICE = await creator(idlFactory, CANISTER_IDS.PICK_PUMP); const result = await actor.create_token({ ...tokenInfo, name: tokenInfo.name, @@ -123,7 +120,9 @@ export const executeCreateToken: Action = { : message.content.text || "" ).toLowerCase(); - return keywords.some((keyword) => messageText.includes(keyword.toLowerCase())); + return keywords.some((keyword) => + messageText.includes(keyword.toLowerCase()) + ); }, handler: async ( runtime: IAgentRuntime, @@ -166,7 +165,7 @@ export const executeCreateToken: Action = { const logoPrompt = await generateText({ runtime, context: logoPromptContext, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); const logo = await generateTokenLogo(logoPrompt, runtime); diff --git a/packages/plugin-solana/src/actions/takeOrder.ts b/packages/plugin-solana/src/actions/takeOrder.ts index 14e7441679d..f877247d19f 100644 --- a/packages/plugin-solana/src/actions/takeOrder.ts +++ b/packages/plugin-solana/src/actions/takeOrder.ts @@ -78,7 +78,7 @@ Determine if the user is trying to shill the ticker. if they are, respond with e const convictionResponse = await generateText({ runtime, context: context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); // TODOL parse and validate the JSON diff --git a/packages/plugin-solana/src/actions/transfer.ts b/packages/plugin-solana/src/actions/transfer.ts index 95bb77f91c4..abf054e8081 100644 --- a/packages/plugin-solana/src/actions/transfer.ts +++ b/packages/plugin-solana/src/actions/transfer.ts @@ -122,7 +122,7 @@ export default { const content = await generateObject({ runtime, context: transferContext, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); // Validate transfer content diff --git a/packages/plugin-starknet/src/actions/takeOrder.ts b/packages/plugin-starknet/src/actions/takeOrder.ts index 8ae56d5a5df..c2986ae73c6 100644 --- a/packages/plugin-starknet/src/actions/takeOrder.ts +++ b/packages/plugin-starknet/src/actions/takeOrder.ts @@ -84,7 +84,7 @@ const take_order: Action = { const convictionResponse = await generateText({ runtime, context: context, - modelClass: ModelClass.SMALL, + modelClass: ModelClass.LARGE, }); // TODOL parse and validate the JSON