The InfiUse App is a comprehensive application that combines various functionalities, including blog creation, code sharing and collaboration, and an AI-powered chat assistant. The app leverages advanced technologies like large language models (LLMs) and APIs to provide an enhanced user experience. Environment Setup
The project starts by loading environment variables, including the Groq API key and the Codestral API key. These keys are required for interacting with the respective AI services used throughout the application. User Authentication Before accessing the main features, users must authenticate themselves. The application provides a user authentication system with the following functionalities:
Login: Users can log in with their username and password.
Registration: New users can register by providing a username, password, security question, and answer.
Forgot Password: Users can reset their password by answering the security question associated with their account.
The user data is stored in a JSON file (users_db.json), and various helper functions are provided to load, save, and authenticate users.
Deployment Link: InfiUse
Important
Not able to see the workflow download from main branch.
Once authenticated, users can access the main functionalities of the application through the main menu. The available options are:
-
Create Blog Post: Users can create a new blog post by providing a title, keywords, and content. The content can be generated using an LLM (Groq or Mistral) based on the provided title and keywords.
-
View Blog Posts: Users can view a list of existing blog posts, including their titles, content, and creation timestamps.
-
Edit Blogs: Users can select an existing blog post and edit its title and content.
-
Delete Blogs: Users can delete an existing blog post by selecting it from a list.
-
Code Snippets Sharing: Users can share code snippets by selecting a programming language and entering the code.
-
Collaborative Coding: Users can view shared code snippets, run the code, edit the code, and delete code snippets.
-
Inspect and Run Code: This functionality analyzes the code for errors and executes it, potentially using the Codestral API for code analysis and execution.
-
Help: A page dedicated to providing assistance (currently under development).
- AI Chat Conversation: Users can engage in a conversational AI chat by asking questions and receiving responses generated by an LLM (Groq or Mistral). The conversation history is displayed, and users can continue the conversation.
The application includes several additional features and functionalities:
-
Coin System: Users accumulate coins based on their actions within the application, such as creating blog posts or submitting code snippets. The coin count is displayed in the sidebar.
-
Code Generation: For blog posts related to technical topics, the application provides the option to generate code snippets based on the blog post title and content.
-
Code Formatting: The application formats code snippets for better readability and generates code titles using an LLM.
-
Logout: Users can log out of the application, clearing their session and authentication data.
Clone the repository
Project repo: https://github.com/adityach007/InfiUse
conda create -n llmapp python=3.8 -y
conda activate llmapp
pip install -r requirements.txt
GROQ_API_KEY= "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
codestral_api = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
FIREWORKS_API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Finally run the following command
streamlit run app.py
Now,
open up localhost:
The InfiUse Blog App is built using the following technologies:
-
Python: The project is written in Python programming language.
-
Streamlit: The application's user interface is developed using the Streamlit framework, which provides an interactive and reactive web interface.
-
Groq: The project utilizes the Groq AI service for language model capabilities, such as generating blog post content, analyzing code, and powering the chat assistant.
-
Codestral API: The Codestral API is used for code generation, analysis, and execution.
-
JSON: User data and code snippets are stored in JSON files for persistence.
-
UUID: The Python uuid module is used to generate unique identifiers for user keys.
-
Datetime: The datetime module is used for handling timestamps and date-time operations.
-
LangChain: The LangChain library is used for building and managing conversations with language models.
-
StreamlitAce: The streamlit-ace library is used for providing a code editor interface within the application.
-
Enhanced Code Collaboration Features: Implement real-time collaborative coding capabilities, allowing multiple users to edit code snippets simultaneously. This could involve using technologies like WebSockets or other real-time communication protocols.
-
Version Control Integration: Integrate version control systems like Git to track changes in code snippets and blog posts, enabling collaborative editing and maintaining a history of changes.
-
Improved Search and Filtering: Implement advanced search and filtering capabilities for blog posts and code snippets, allowing users to find relevant content more efficiently.
-
Mobile App Development: Develop mobile applications (iOS and Android) for the InfiUse Blog App, providing users with a native mobile experience.
-
Educational Platform: The InfiUse Blog App could be used as an educational platform for coding and blogging. Instructors could create and share code snippets, tutorials, and blog posts with students, fostering a collaborative learning environment.
-
Developer Community: The application could serve as a platform for developers to share code snippets, discuss programming concepts, and collaborate on projects within a community setting.
-
AI-Assisted Debugging and Code Optimization: The AI capabilities could be expanded to include code debugging and optimization suggestions, helping developers identify and fix issues in their code more efficiently.
We welcome and appreciate contributions from the community to help improve and expand the InfiUse Blog App. Whether you're addressing an existing issue, proposing a new feature, or fixing a bug, your contributions are valuable and will help enhance the project's capabilities
The InfiUse Blog App is a feature-rich application that combines blogging, code sharing, collaboration, and AI-powered chat capabilities. It leverages advanced technologies like large language models and APIs to provide an enhanced user experience. The project demonstrates the integration of various Python libraries and AI services to create a comprehensive and interactive application.