forked from elizaOS/eliza
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Predictions #2
Merged
Merged
Predictions #2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
nicky-ru
commented
Jan 29, 2025
…ionality - Implemented `getReadyActivePredictions` method in the PostgresDatabaseAdapter to fetch open predictions nearing their deadline. - Added `resolvePrediction` method to update the status and outcome of predictions in the database. - Enhanced AutoClient to periodically check for active predictions and resolve them based on weather data. - Updated package dependencies in client-auto to include new prediction plugins. - Exported additional actions and helpers in the depin and prediction plugins for better integration.
…ployment - Switch to using pre-built 'bino:latest' image instead of local build - Expose container port dynamically using environment variable - Add commented example for optional local directory mounting - Increase Node.js memory allocation
- Comment out voice state update and user stream event listeners - Temporarily remove voice-related event handling from Discord client initialization
- Simplify message handling logic by removing redundant comments and intermediate variables - Update message ID generation to use room ID instead of agent ID for more consistent UUID creation - Streamline reply-to message reference generation - Minor code cleanup and readability improvements
- Update memory logging to use error level for duplicate memory entries - Include memory ID and content details in the log message for better debugging
- Add retry count and maximum retry limit to generation functions - Enhance logging with retry attempt details - Throw specific error messages when maximum retries are exhausted - Standardize retry logic across multiple generation functions
- Remove '@elizaos/plugin-prediction' from agent and client-auto package dependencies - Update package.json files to remove unused plugin references - Update pnpm-lock.yaml with latest dependency versions - Add '@elizaos/plugin-evm' to plugin-depin dependencies
- Comment out Mistral-related code in generation and provider handling functions - Disable Mistral model generation and object generation methods - Remove unused Mistral-specific implementation details
…esolution - Move prediction resolution logic from AutoClient to a dedicated PredictionResolver service - Add new ServiceType.PREDICTION_RESOLVER to core types - Implement interval-based prediction resolution with weather data retrieval and outcome determination - Improve logging and error handling for prediction resolution process
…lugin - Implement predictionEvaluator to extract and manage predictions from conversations - Add PredictionResolver service for handling prediction lifecycle - Create blockchain helpers for creating and resolving predictions on IoTeX - Integrate prediction-related template and ABI for smart contract interactions - Remove deprecated plugin-prediction package and consolidate prediction functionality
- Add support for both IoTeX mainnet and testnet networks - Update validation and contract interaction methods to handle network selection - Modify blockchain helpers to use correct network configuration - Implement network validation in PredictionResolver and prediction evaluator
- Add comprehensive ERC20 ABI for token contract interactions - Update prediction contract ABI with expanded function and event definitions - Enhance contract interaction support for DePIN plugin
- Implement placeBet function to interact with binary prediction contract - Add getBetAmount helper to validate and manage bet amount and allowance - Support bet placement for specific prediction, outcome, and bettor - Integrate ERC20 ABI for token allowance checks - Handle network-specific contract interactions for IoTeX
… blockchain predictions - Implement LIST_PREDICTIONS action to fetch and format open predictions - Add support for displaying predictions with their statement and deadline - Include user-friendly betting instructions in the response - Handle cases with no active predictions - Integrate with database adapter for prediction retrieval
…etting - Implement PREPARE_BET action to generate token approval QR code and transaction - Add PLACE_BET action to finalize bet placement on blockchain prediction contract - Support token allowance generation, bet parameter extraction, and transaction handling - Enhance blockchain helper functions to handle bet amount validation and network-specific interactions - Integrate QR code generation for seamless token approval process
…esponse tag - Modify handler to compose state before processing predictions - Change parseTagContent to use "response" tag instead of "result" - Ensure correct state initialization and prediction response parsing
- Remove QR code generation from prepareBet action - Modify genTxDataForAllowance to return only encoded transaction data - Update prepareBet response to use a simpler transaction instruction format - Remove unnecessary network and wallet-specific transaction preparation logic
- Update messageCompletionFooter to emphasize valid JSON formatting with string handling - Modify stringArrayFooter to use double quotes for consistent JSON formatting - Ensure clear guidelines for JSON block response structure in parsing utilities
- Update DiscordJS opus package to latest commit - Resolve minor dependency version changes - Adjust package.json dependency order in plugin-depin - Clean up redundant dependency configurations
- Change message generation model from SMALL to LARGE in Discord client - Disable debug logging for local embedding model to reduce verbosity - Add clarifying instruction to response formatting in parsing utilities
- Update listPredictions to improve prediction display with ID and formatting - Modify prepareBet and placeBet actions to streamline bet preparation and placement - Improve bet parameter extraction and transaction handling - Enhance user instructions and response messages for betting process - Adjust prediction resolver to handle errors more gracefully - Refine prediction template to focus specifically on weather predictions
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.
Hi @nicky-ru! Welcome to the ai16z community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now a ai16z contributor!
- Add `getNetwork()` function to standardize network retrieval and validation - Replace hardcoded network checks with centralized network resolution - Update multiple files to use new `getNetwork()` method - Improve type safety by using `SupportedChain` from EVM plugin - Simplify network configuration across prediction-related actions and services
- Implement max ongoing predictions check in validate method - Use configurable MAX_ONGOING_PREDICTIONS environment variable - Retrieve open predictions from database to enforce limit - Prevent creating new predictions when maximum is reached
…on market - Introduce ERC20 ABI for token interactions - Add prediction market contract ABI for blockchain interactions - Include Solidity smart contract implementation for PredictionMarket - Update blockchain helper imports to use new contract locations - Prepare foundational smart contract infrastructure for decentralized prediction platform
…ver documentation - Add detailed configuration instructions for prediction market setup - Include environment variable examples for QuickSilver and prediction contracts - Expand README with new sections on prediction actions, evaluators, and services - Add mermaid diagram illustrating prediction workflow - Provide usage examples for PREPARE_BET and PLACE_BET actions - Explain prediction creation, validation, and resolution processes
…teractions - Update prepareBet action to use PREDICTION_TOKEN environment variable - Modify blockchain helper allowance retrieval to use new token contract - Ensure consistent token contract reference across prediction market actions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.