added RAG (both populate and search + tg bot example) #101
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.
Summary
Added RAG (Retrieval-Augmented Generation) Pinecone plugin that enables knowledge base creation, management, and querying with Telegram bot integration.
Links
Plugin documentation: Located in game-python/plugins/RAGPinecone/README.md
Issue link (if applicable): N/A
Other useful links: https://docs.pinecone.io/docs/overview
Plugin Documentation Checklist
README Validation
[x] Clear installation instructions
[x] Usage examples with code snippets
[x] List of features and capabilities
[x] Troubleshooting guide (if applicable)
[x] Contribution guidelines (if applicable)
Metadata Validation
[x] Complete metadata provided in reference to plugin metadata template
Dev Testing
(Include where applicable)
Screenshots/GIFs: N/A
Video Demonstrations: N/A
Logs or Console Outputs: Successfully tested with Telegram bot integration and Google Drive document retrieval
Testing steps for the plugin:
Install the plugin dependencies
Set up environment variables (PINECONE_API_KEY, OPENAI_API_KEY, GAME_API_KEY, TELEGRAM_BOT_TOKEN)
Run populate_knowledge_base.py to load documents into the vector database
Run test_rag_pinecone_telegram.py to start the Telegram bot with RAG capabilities
Test queries in Telegram that require knowledge retrieval
Additional Notes
Future enhancements:
Add support for more document types
Implement document versioning and update tracking
Add caching mechanism to improve response times
Optimize embedding generation for better performance
Known limitations:
Large documents may take time to process
Currently optimized for text-based content, multimedia content requires additional processing
Requires OpenAI API key for embeddings generation
Google Drive integration requires public sharing settings for folders