-
Notifications
You must be signed in to change notification settings - Fork 5.4k
LLM Based Conversion #4832
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
LLM Based Conversion #4832
Conversation
… manual regex parsing to LLM extraction in getTransactionDetails, getLogs, deploySmartContract - Remove fallbacks from estimateGas and estimateTransactionFee - Fix settings access patterns - All 22 actions now use consistent LLM-based extraction
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces regex-based parameter extraction with LLM-driven parsing across several actions, standardizes configuration retrieval via runtime.getSetting, and removes fallback and deprecated response properties.
- Integrated
callLLMWithTimeoutfor extracting transaction hashes, log filters, and deployment parameters - Removed direct regex fallback logic in
estimateTransactionFee,estimateGas, anddeploySmartContract - Standardized config loading to only use
runtime.getSettingand droppedprocess.envfallbacks - Stripped
sourcefields fromContentpayloads in favor of a unifieddataobject
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/plugin-polygon-zkevm/src/actions/interactSmartContract.ts | Simplified config retrieval; updated keyword matching logic |
| packages/plugin-polygon-zkevm/src/actions/getTransactionDetails.ts | Added LLM hash parsing; standardized config; updated responses |
| packages/plugin-polygon-zkevm/src/actions/getLogs.ts | Added LLM log-filter parsing; standardized config; updated responses |
| packages/plugin-polygon-zkevm/src/actions/deploySmartContract.ts | Added LLM deployment parsing; removed direct bytecode fallback |
| packages/plugin-polygon-zkevm/src/actions/bridgeMessages.ts | Simplified config retrieval; updated keyword list |
| packages/plugin-polygon-zkevm/src/actions/estimateTransactionFee.ts | Removed regex fallback extraction |
| packages/plugin-polygon-zkevm/src/actions/estimateGas.ts | Removed regex fallback extraction |
Comments suppressed due to low confidence (12)
packages/plugin-polygon-zkevm/src/actions/getTransactionDetails.ts:284
- Response payload omits the original
sourceproperty. Confirm that clients no longer needsource, or add it back for compatibility.
data: combinedData,
packages/plugin-polygon-zkevm/src/actions/getLogs.ts:195
- Response no longer includes
source. If that breaks existing clients, consider re-adding it alongsidedata.
data: { filter, logs: logs.slice(0, 10), totalLogs: logs.length },
packages/plugin-polygon-zkevm/src/actions/interactSmartContract.ts:38
- Configuration now only reads from runtime settings, dropping
process.envfallback. Reintroduce|| process.env.ALCHEMY_API_KEYto preserve env-based overrides.
const alchemyApiKey = runtime.getSetting('ALCHEMY_API_KEY');
packages/plugin-polygon-zkevm/src/actions/interactSmartContract.ts:39
- Configuration now only reads from runtime settings, dropping
process.envfallback. Reintroduce|| process.env.ZKEVM_RPC_URLto preserve env-based overrides.
const zkevmRpcUrl = runtime.getSetting('ZKEVM_RPC_URL');
packages/plugin-polygon-zkevm/src/actions/getTransactionDetails.ts:55
- Dropped
process.envfallback for Alchemy API key. Consider adding|| process.env.ALCHEMY_API_KEYto maintain backward compatibility.
const alchemyApiKey = runtime.getSetting('ALCHEMY_API_KEY');
packages/plugin-polygon-zkevm/src/actions/getTransactionDetails.ts:56
- Dropped
process.envfallback for RPC URL. Consider re-adding|| process.env.ZKEVM_RPC_URLso env vars still apply.
const zkevmRpcUrl = runtime.getSetting('ZKEVM_RPC_URL');
packages/plugin-polygon-zkevm/src/actions/getTransactionDetails.ts:62
- Removed
sourcefield from error content. If consumers rely onsource, reintroduce it or ensure downstream handling usesdataexclusively.
text: errorMessage,
packages/plugin-polygon-zkevm/src/actions/getLogs.ts:46
- Dropped
process.envfallback for Alchemy key. Consider re-adding|| process.env.ALCHEMY_API_KEY.
const alchemyApiKey = runtime.getSetting('ALCHEMY_API_KEY');
packages/plugin-polygon-zkevm/src/actions/getLogs.ts:47
- Dropped
process.envfallback for RPC URL. Consider re-adding|| process.env.ZKEVM_RPC_URL.
const zkevmRpcUrl = runtime.getSetting('ZKEVM_RPC_URL');
packages/plugin-polygon-zkevm/src/actions/deploySmartContract.ts:39
- Validation now always returns true, causing this action to trigger on any input. Narrow the condition to only relevant deployment requests.
return true;
packages/plugin-polygon-zkevm/src/actions/bridgeMessages.ts:61
- Dropped
process.envfallback for Alchemy key. Consider re-adding|| process.env.ALCHEMY_API_KEY.
const alchemyApiKey = runtime.getSetting('ALCHEMY_API_KEY');
packages/plugin-polygon-zkevm/src/actions/bridgeMessages.ts:71
- Keyword list no longer includes
'calldata', which may miss valid bridge calldata requests. Consider reintroducing it.
const bridgeMessageKeywords = [
No description provided.