š Your AI Pair Programmer with Debugging Superpowers
DeepSeek Code Companion is a Streamlit-based application that leverages the power of Groq and LangChain to provide an AI-powered coding assistant. It helps you with Python coding, debugging, code documentation, and solution design. Groq model
Features
š Python Expert: Get expert assistance with Python programming.
š Debugging Assistant: Identify and fix bugs in your code with strategic print statements.
š Code Documentation: Generate clear and concise documentation for your code.
š” Solution Design: Receive guidance on designing efficient and scalable solutions.
Technologies Used
Streamlit: For building the web application interface.
Groq: For high-performance AI model inference.
LangChain: For managing the AI pipeline and prompt templates.
Dotenv: For managing environment variables.
Prerequisites
Before running the application, ensure you have the following installed:
Python 3.8 or higher
Groq API Key: Sign up at Groq to get your API key.
Required Python Libraries:
streamlit
langchain-groq
langchain-core
python-dotenv
Setup Instructions
1. Clone the Repository
git clone https://github.com/ankitsharma5911/groq-chatbot.git
cd groq-chatbot
2. Install Dependencies
Install the required Python libraries using pip:
pip install -r requirements.txt
3. Set Up Environment Variables
Create a .env file in the root directory and add your Groq API key:
GROQ_API=your_groq_api_key_here
Replace your_groq_api_key_here with your actual Groq API key.
4. Run the Application
Start the Streamlit application:
streamlit run app.py
The application will open in your default web browser.
Usage
Select a Model: Choose a Groq model from the sidebar (e.g., mixtral-8x7b-32768 or llama2-70b-4096).
Ask a Question: Type your coding question or problem in the chat input box.
Get Assistance: The AI will provide concise and accurate solutions, debugging tips, or documentation.
Customization
Change Model
You can modify the available models in the selected_model dropdown by editing the app.py file:
selected_model = st.selectbox("Choose Model",["mixtral-8x7b-32768","llama2-70b-4096"],# Add or remove models here index=0)
Modify System Prompt
Update the system prompt in the app.py file to customize the AI's behavior:
system_prompt = SystemMessagePromptTemplate.from_template("You are an expert AI coding assistant. Provide concise, correct solutions ""with strategic print statements for debugging. Always respond in English.")
Contributing
Contributions are welcome! If you'd like to contribute, please follow these steps:
Fork the repository.
Create a new branch for your feature or bugfix.
Commit your changes.
Submit a pull request.
License
This project is licensed under the GNU License. See the LICENSE file for details.
Acknowledgments
Groq for providing the high-performance AI models.