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

Add Langchain Tool checking to CI #240

Merged
merged 7 commits into from
Jan 29, 2025

Conversation

ngundotra
Copy link
Contributor

@ngundotra ngundotra commented Jan 25, 2025

Add Langchain Tool checking to CI

Related Issue

Fixes #239

Changes Made

This PR adds the following changes:

  • add pnpm check-tool-names:langchain to check for duplicates
  • adds this script to CI on every new PR

Implementation Details

  • add scripts/check-langchain-tool-duplicates.ts to check for duplicates in createSolanaTools

Transaction executed by agent

Example transaction:

Additional Notes

Checklist

  • I have tested these changes locally

Example output of pnpm check-tool-names:langchain (before this PR)

~/solana-agent-kit$ pnpm check-tool-names:langchain
> [email protected] check-tool-names:langchain /home/ubuntu/solana-agent-kit
> tsx scripts/check-langchain-tool-duplicates.ts

❌ Duplicate tool names detected:

Name: 3land_minting_tool
Used by classes:
- Solana3LandCreateSingle
- Solana3LandCreateCollection
- Solana3LandCreateSingle

Name: solana_send_transaction_with_priority_fee
Used by classes:
- SolanaSendTransactionWithPriorityFee
- SolanaSendTransactionWithPriorityFee

Name: create_helius_webhook
Used by classes:
- SolanaHeliusWebhookTool
- SolanaHeliusWebhookTool

Name: get_helius_webhook
Used by classes:
- SolanaGetHeliusWebhookTool
- SolanaGetHeliusWebhookTool

Name: delete_helius_webhook
Used by classes:
- SolanaDeleteHeliusWebhookTool
- SolanaDeleteHeliusWebhookTool

❌ Classes used for multiple tools:

Class: Solana3LandCreateSingle
Used for tools:
- 3land_minting_tool
- 3land_minting_tool

Class: SolanaSendTransactionWithPriorityFee
Used for tools:
- solana_send_transaction_with_priority_fee
- solana_send_transaction_with_priority_fee

Class: SolanaHeliusWebhookTool
Used for tools:
- create_helius_webhook
- create_helius_webhook

Class: SolanaGetHeliusWebhookTool
Used for tools:
- get_helius_webhook
- get_helius_webhook

Class: SolanaDeleteHeliusWebhookTool
Used for tools:
- delete_helius_webhook
- delete_helius_webhook

Example output after this PR

~/solana-agent-kit$ pnpm check-tool-names:langchain

> [email protected] check-tool-names:langchain /home/ubuntu/solana-agent-kit
> tsx scripts/check-langchain-tool-duplicates.ts

✅ All checks passed:
- No duplicate tool names
- No classes reused for multiple tools

@ngundotra
Copy link
Contributor Author

@thearyanag should be fixed!

@thearyanag thearyanag merged commit 8029e89 into sendaifun:main Jan 29, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Langchain Tools repeated
2 participants