SocraBot
SocraBot is a chatbot designed to help university students learn programming. Integrated as a VS Code extension, SocraBot enhances the learning experience by explaining code, finding errors, providing hints, generating and evaluating test cases, and offering comprehensive support. SocraBot is your intelligent and supportive assistant for module tutorials, aimed at improving your coding skills.
Features
- Code Explanation: Get detailed explanations of code snippets.
- Error Detection: Identify and understand errors in your code.
- Hints and Tips: Receive helpful hints to guide you through programming challenges.
- Test Case Generation and Evaluation: Generate and evaluate test cases for your code.
- Comprehensive Support: All-in-one support to improve your coding experience.
Installation
Developer Installation
To install SocraBot in a development environment in VS Code, follow these steps:
- Clone the repository.
- Navigate to the src/webview directory.
- Run npm install to install dependencies.
- Run npm run watch to start the build process.
- Open VS Code.
- Click on the Run and Debug icon in the Activity Bar.
- Click Start Debugging to launch SocraBot.
Usage
- Open a programming file in VS Code.
- Launch SocraBot by clicking on the SocraBot icon in the Activity Bar.
- Type your question or paste your code snippet into the SocraBot chat window.
- Press Enter to send your message.
- SocraBot will respond with explanations, error detections, hints, test case evaluations, or other relevant support.
Environment Variables
To configure SocraBot, set the following environment variables as can be seen in example.env
:
KEY_VAULT_NAME=<Your Key Vault Name>
SECRET_NAME=<Your Secret Name>
AZURE_CLIENT_ID=<Your Azure Client ID>
AZURE_CLIENT_SECRET=<Your Azure Client Secret>
AZURE_TENANT_ID=<Your Azure Tenant ID>
Deployment
Azure Key Vault
Ensure your OpenAI API key is stored in Azure Key Vault. The following environment variables are required to fetch the API key from Azure Key Vault:
- KEY_VAULT_NAME: The name of your Azure Key Vault.
- SECRET_NAME: The name of the secret storing your OpenAI API key.
- AZURE_CLIENT_ID: Your Azure client ID.
- AZURE_CLIENT_SECRET: Your Azure client secret.
- AZURE_TENANT_ID: Your Azure tenant ID.
Deploying to Azure Marketplace
To deploy the VS Code extension app, you can publish it on the Azure Marketplace. Follow the Azure Marketplace documentation for detailed steps on how to package and publish your extension.
Reference Documentation
For further information and reference, consult the following documentation: