Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

similar action how to due is better? #2144

Open
cxp-13 opened this issue Jan 11, 2025 · 0 comments
Open

similar action how to due is better? #2144

cxp-13 opened this issue Jan 11, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@cxp-13
Copy link

cxp-13 commented Jan 11, 2025

Is your feature request related to a problem? Please describe.

If my plugin has raydium-deposit and deposit the two actions have problems when I send a deposit me 10 $WIF on raydium, the system will trigger the deposit not raydium-deposit, So I just modified the deposit valid function to skip that was not a smart solution plan.

deposit valid part:

export const executeDeposit: Action = {
  name: "EXECUTE_DEPOSIT",
  similes: ["DEPOSIT_TOKENS", "TOKEN_DEPOSIT"],
  validate: async (runtime: IAgentRuntime, message: Memory) => {
    console.log("=== deposit validate ===");
    console.log("message: ", JSON.stringify(message, null, 2));
    let msg = message.content.text;
    return msg.includes("deposit") && !msg.includes("raydium");
  },

raydium-deposit valid part:

export const executeRaydiumDeposit: Action = {
  name: "EXECUTE_RAYDIUM_DEPOSIT",
  similes: ["RAYDIUM_DEPOSIT", "DEPOSIT_TOKENS", "PERFORM_DEPOSIT"],
  validate: async (runtime: IAgentRuntime, message: Memory) => {
    console.log("=== raydium deposit validate ===");
    console.log("message: ", JSON.stringify(message, null, 2));
    let msg = message.content.text.toLowerCase();
    const keywords = [
      "deposit",
      "add liquidity",
      "provide liquidity",
      "stake",
      "supply",
    ];
    return msg.includes("raydium") && keywords.some((keyword) => msg.includes(keyword));
  },

Describe the solution you'd like

Describe alternatives you've considered

Additional context

@cxp-13 cxp-13 added the enhancement New feature or request label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant