diff --git a/source/common/tools/student-virtual-coach.rst b/source/common/tools/student-virtual-coach.rst index 50fcf8e9..732fa340 100644 --- a/source/common/tools/student-virtual-coach.rst +++ b/source/common/tools/student-virtual-coach.rst @@ -7,50 +7,48 @@ Virtual Coach ============= -The Virtual Coach can help you understand the error messages you have received, gain a better understanding of the assignment prompt, or receive a hint about the next possible steps. +The Virtual Coach can help you understand error messages, gain a better understanding of the assignment prompt, or receive a hint about the next possible steps. .. note:: Virtual Coach responses may be AI-generated. Always verify suggestions against your assignment, course materials, and instructor guidance. -To open Virtual Coach, click the Chatbot icon at the bottom-right corner of the screen. This icon will only be available if your teachers enable this feature. +To open the Virtual Coach, click the Chatbot icon at the bottom-right corner of the screen. This icon will only be available if your instructor has enabled this feature. -.. image:: /img/chatbot-icon.png - :alt: ChatBot icon at the bottom left corner +.. image:: /img/vc-and-extensions/coach-icon.png + :alt: Virtual Coach icon at the bottom right corner -When you open Virtual Coach, you will see up to three options depending on the settings applied. If there is no guide in the assignment, only error message augmentation will be available. +When you open Virtual Coach, you will see the options your instructor has enabled. If there is no guide in the assignment, only error message augmentation will be available. -.. image:: /img/Hint-Bot.png - :alt: ChatBot window with three options +.. image:: /img/vc-and-extensions/student-view-coach.png + :alt: The student view of Virtual Coach -- **Summarize what I need to do**: This option summarizes the text in the guide on the page and provides you with an enumerated set of steps. +- **Summarize what I need to do**: This option summarizes the instructions and provides you with an enumerated set of steps. -.. image:: /img/Summarise-bot.png - :alt: Summary of the assessment by chatbot +.. image:: /img/vc-and-extensions/student-vc-summary.png + :alt: The student view of an assignment summary in Virtual Coach -- **Explain an error**: Provides detailed explanations of error messages. After clicking this option, you must paste in the error message text you wish to have explained +- **Explain an error**: Provides detailed explanations of error messages. After clicking this option, you must paste in the error message text. -.. image:: /img/Explain-error.png - :alt: Explain an error by chatbot +.. image:: /img/vc-and-extensions/student-vc-error.png + :alt: The student view of an error explanation in Virtual Coach - **Provide a hint on what to do next**: Provides you with ideas for the next steps you can take to complete your assignment. +.. image:: /img/vc-and-extensions/student-vc-hint.png + :alt: The student view of next steps hints in Virtual Coach -.. image:: /img/chatbot-hint-option.png - :alt: Hint option by chatbot - - -You can provide feedback on the Virtual Coach’s responses by using the thumbs up icon to vote up or the thumbs down icon to vote down the responses. -You can also resize the chatbot window by dragging the circle that appears at the top left corner. \ No newline at end of file +You can provide feedback on the Virtual Coach’s responses by using the thumbs up or thumbs down icon. +The Virtual Coach window may be resized by dragging the resizing icon in the upper left corner. diff --git a/source/img/Assignment-settings-Vc.png b/source/img/Assignment-settings-Vc.png deleted file mode 100644 index aa941be8..00000000 Binary files a/source/img/Assignment-settings-Vc.png and /dev/null differ diff --git a/source/img/Explain-error.png b/source/img/Explain-error.png deleted file mode 100644 index cfa59bdb..00000000 Binary files a/source/img/Explain-error.png and /dev/null differ diff --git a/source/img/Hint-Bot.png b/source/img/Hint-Bot.png deleted file mode 100644 index 0bd90d98..00000000 Binary files a/source/img/Hint-Bot.png and /dev/null differ diff --git a/source/img/Summarise-bot.png b/source/img/Summarise-bot.png deleted file mode 100644 index d6ce6892..00000000 Binary files a/source/img/Summarise-bot.png and /dev/null differ diff --git a/source/img/chatbot-hint-option.png b/source/img/chatbot-hint-option.png deleted file mode 100644 index bd099548..00000000 Binary files a/source/img/chatbot-hint-option.png and /dev/null differ diff --git a/source/img/chatbot-icon.png b/source/img/chatbot-icon.png deleted file mode 100644 index 1c7eb480..00000000 Binary files a/source/img/chatbot-icon.png and /dev/null differ diff --git a/source/img/course_settings/course-level-extensions.png b/source/img/course_settings/course-level-extensions.png new file mode 100644 index 00000000..eaf82a7d Binary files /dev/null and b/source/img/course_settings/course-level-extensions.png differ diff --git a/source/img/extensions-virtual-coach.png b/source/img/extensions-virtual-coach.png deleted file mode 100644 index d9154430..00000000 Binary files a/source/img/extensions-virtual-coach.png and /dev/null differ diff --git a/source/img/manage_organization/customextension.png b/source/img/manage_organization/customextension.png new file mode 100644 index 00000000..ff3b6a7d Binary files /dev/null and b/source/img/manage_organization/customextension.png differ diff --git a/source/img/vc-and-extensions/coach-assignment-settings.png b/source/img/vc-and-extensions/coach-assignment-settings.png new file mode 100644 index 00000000..d6d00acc Binary files /dev/null and b/source/img/vc-and-extensions/coach-assignment-settings.png differ diff --git a/source/img/vc-and-extensions/coach-icon.png b/source/img/vc-and-extensions/coach-icon.png new file mode 100644 index 00000000..10b86251 Binary files /dev/null and b/source/img/vc-and-extensions/coach-icon.png differ diff --git a/source/img/vc-and-extensions/preference-extensions.png b/source/img/vc-and-extensions/preference-extensions.png new file mode 100644 index 00000000..d9355a5c Binary files /dev/null and b/source/img/vc-and-extensions/preference-extensions.png differ diff --git a/source/img/vc-and-extensions/student-vc-error.png b/source/img/vc-and-extensions/student-vc-error.png new file mode 100644 index 00000000..b14daa91 Binary files /dev/null and b/source/img/vc-and-extensions/student-vc-error.png differ diff --git a/source/img/vc-and-extensions/student-vc-hint.png b/source/img/vc-and-extensions/student-vc-hint.png new file mode 100644 index 00000000..281adc04 Binary files /dev/null and b/source/img/vc-and-extensions/student-vc-hint.png differ diff --git a/source/img/vc-and-extensions/student-vc-summary.png b/source/img/vc-and-extensions/student-vc-summary.png new file mode 100644 index 00000000..300039e6 Binary files /dev/null and b/source/img/vc-and-extensions/student-vc-summary.png differ diff --git a/source/img/vc-and-extensions/student-view-coach.png b/source/img/vc-and-extensions/student-view-coach.png new file mode 100644 index 00000000..73285043 Binary files /dev/null and b/source/img/vc-and-extensions/student-view-coach.png differ diff --git a/source/instructors/admin/organization/org-extensions.rst b/source/instructors/admin/organization/org-extensions.rst new file mode 100644 index 00000000..63f48bd7 --- /dev/null +++ b/source/instructors/admin/organization/org-extensions.rst @@ -0,0 +1,22 @@ +.. meta:: + :description: Adding custom extensions to your organization + +.. _org-extensions: + + +Custom Organization Extensions +============================== + +You can add custom extensions similar to the Virtual Coach extensions supplied by Codio. More information about custom extensions can be found on the :ref:`Virtual Coach ` page. + +1. Click your username in the top-right corner, then select **Organization** from the menu. + +2. In the **Organizations** tab, click the name of your organization. + + .. image:: /img/class_administration/createanorganization/organizations.png + :alt: My Organizations + +3. Click the **Extensions** tab. + + .. image:: /img/manage_organization/customextension.png + :alt: Organization Extensions Tab diff --git a/source/instructors/admin/organization/organisation.rst b/source/instructors/admin/organization/organisation.rst index c1d73884..d11cc61c 100644 --- a/source/instructors/admin/organization/organisation.rst +++ b/source/instructors/admin/organization/organisation.rst @@ -22,6 +22,7 @@ Organization settings gigabox-usage delete-org org-contact-url + org-extensions auto-release-grades hide-av student-email @@ -52,6 +53,7 @@ The person who creates the organization in Codio is the owner and is given the a - :ref:`Gigaboxes ` - :ref:`Delete an Organization ` - :ref:`Set Organization Contact URL ` +- :ref:`Configure Organization Extensions ` - :ref:`Enable/Disable Release Grade Automatically ` - :ref:`Hide A/V calls ` - :ref:`Set up SSO Integration ` diff --git a/source/instructors/admin/organization/prompt-management.rst b/source/instructors/admin/organization/prompt-management.rst index a342e133..0e31fa8a 100644 --- a/source/instructors/admin/organization/prompt-management.rst +++ b/source/instructors/admin/organization/prompt-management.rst @@ -33,7 +33,7 @@ Enter your prompt text and specify the data you want to include as context. - Click **Create** once you have entered all the information. .. note:: - Files are retrieved dynamically on the server when the assistant is used. If a referenced file is deleted or doesn’t exist after the prompt is created, an empty string is sent as context. + Files are retrieved dynamically on the server when the assistant is used. If a referenced file is deleted or doesn't exist after the prompt is created, an empty string is sent as context. .. image:: /img/manage_organization/promptmanagement.png :alt: The prompt management dialog @@ -111,3 +111,27 @@ Using the Prompt in a Custom Extension } })(window.codioIDE, window) + +Using Wildcards to Reference Files in Custom Assistants +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can use wildcards to reference files. These are useful when your assignments contain files with different names. Wildcards follow standard glob patterns (e.g., * matches zero or more characters). + +.. note:: When multiple files match, the first match in alphabetical order is selected. + +Here is an example: + +.. code:: none + + Here is the question the student is working on: + + {{"type": "VARIABLE", "name": "GUIDE_CONTENT"}} + + Here's the sample solution for the question: + + {{"type": "INSTRUCTOR_VIEW", "filepath": ".guides/secure/lab*.py"}} + + Here's the starter code for the assignment: + + {{"type": "STARTER_CODE", "filepath": "lab*.py"}} + \ No newline at end of file diff --git a/source/instructors/getstarted/support/changelog.rst b/source/instructors/getstarted/support/changelog.rst index 95c86193..6d2e7a39 100644 --- a/source/instructors/getstarted/support/changelog.rst +++ b/source/instructors/getstarted/support/changelog.rst @@ -13,9 +13,14 @@ We do not report small bug fixes or issues that affect individual users, who we `[I]` = Update or improvement `[F]` = New feature +**January 2026** + +- `[I] [7th]`: Add a way to :ref:`Enable or disable extensions on a course level `. + **December 2025** - `[I] [19th]`: Add a way to :ref:`remove any organization member `. +- `[I] [18th]`: Added support for wildcards in file names for :ref:`custom assistants `. - `[I] [12th]`: Added support for the :ref:`Jupyter Collaboration Extension `. **November 2025** diff --git a/source/instructors/setupcourses/assignment-settings/virtual-coach.rst b/source/instructors/setupcourses/assignment-settings/virtual-coach.rst index 4f8ed5ed..19ede9bc 100644 --- a/source/instructors/setupcourses/assignment-settings/virtual-coach.rst +++ b/source/instructors/setupcourses/assignment-settings/virtual-coach.rst @@ -1,5 +1,5 @@ .. meta:: - :description: Hint-Bot is a quick AI solution for helping students with simple queries. + :description: Virtual Coach is an AI tool for assisting students with explanations, error messages, and hints. .. _virtual-coach: @@ -7,243 +7,81 @@ Virtual Coach ************* -When Virtual Coach is enabled, students can use AI to assist them with their programming tasks. Codio's prompts to the AI ensure that only assistance is provided, not solutions. The Virtual Coach can help students understand error messages they have received, gain a better understanding of the assignment prompt, or receive a hint about the next possible steps. -Codio conducts extensive research in the field of AI use in computing education, with error messages, summaries, and hints representing well-researched use cases for AI-assisted learning. Our Coach feature, which generates AI-powered error messages, demonstrates positive benefits for learners through improved completion rates and higher median grade attainment. For more information, you can download `our research paper `_. - -.. note:: - Coach is powered by Anthropic's Claude model. No student's personally identifiable information (PII) is stored by Anthropic, ensuring student privacy protection. - -In the assignments settings area, there are three settings you can toggle to enable the following features: **Summarize Prompt**, **Error Augmentation**, and **Next Steps Hint**. - - -.. image:: /img/Assignment-settings-Vc.png - :alt: Assignment setting vc +When Virtual Coach is enabled, students can use AI to assist them with their programming tasks. Codio's prompts to the AI ensure that only assistance is provided, not solutions. +The Virtual Coach can help students understand error messages, gain a better understanding of the assignment prompt, or receive a hint about the next possible steps. -When a student clicks on the Virtual Coach icon in the bottom right corner, a dialog opens, and they can see up to three options depending on the settings applied. If there is no :ref:`Guide` in the assignment only error message augmentation will be available. +Codio conducts extensive research in the field of AI use in computing education. Error messages, summaries, and hints represent well-researched use cases for AI-assisted learning. Our Virtual Coach feature, which generates AI-powered explanations, demonstrates positive benefits for learners through improved completion rates and higher median grade attainment. +For more information, you can download `our research paper `_. -Students may select one of the options presented by the coach to receive more information. - -.. image:: /img/Hint-Bot.png - :alt: Hint-Bot +.. note:: + Virtual Coach is powered by Anthropic's Claude model. No student's personally identifiable information (PII) is stored by Anthropic, ensuring student privacy protection. +In the assignment settings, there are three settings you can toggle to enable the following features: **Summarize Prompt**, **Error Augmentation**, and **Next Steps Hint**. -- **Summarize prompt**: This option summarizes the text in the guide on the page and provides students with an enumerated set of steps. +- **Summarize Prompt**: This option summarizes the text in the guide on the page and provides students with an enumerated set of steps. - **Error Augmentation**: Provides detailed explanations of error messages. -- **Next steps hint**: Provides students with ideas for the next steps they can take to complete their assignment. - -.. image:: /img/Summarise-bot.png - :alt: Summary-Hint - - - -If error output is not directed to the guide, students will need to paste the text of the error message in the prompt field in Virtual Coach. - - -If an error message is not provided, the student will receive the following: "The provided text does not look like an error message. Please paste an error message below." If, on the second attempt, the student still does not provide an error message, they will be returned to the first screen with three buttons. - -.. image:: /img/Explain-error.png - :alt: Explain-Error - - -.. Note:: Standard and Advanced Code tests have an additional "Explain this error" button that will appear if Error Augmentation is on and running a code test results in an error state. - -Students can provide feedback on the Virtual Coach’s responses by using the thumbs up icon to vote up or the thumbs down icon to vote down the responses. -The Virtual Coach window may be resized by dragging the circle in the upper left corner. - -.. Note:: You can export Virtual Coach logs using one of the Codio API **codio.course.exportCoachData(courseId)**. For more information on Codio APIs and how to use it, check out `Codio JS API `_ - -.. Note:: You can review how the Virtual Coach interacts with students by exporting the Course Coach Log Data. For more information, see the :ref:`Course Coach Log Data` - -.. _enable-vc-bulk: - -Enable/Disable Virtual Coach Assistants via Bulk Settings -========================================================= - -You can enable/disable these three settings for all assignments in a course at bulk, check out :ref:`Bulk Assignment Update` - -- The csv template for bulk assignment settings upload has 3 new columns now, one for each of the virtual coach assistants. -- These column values in the csv can be set to TRUE to enable any/all of the 3 assistants for any assignments in the course, and FALSE to disable them as part of the bulk settings update process. - - -Customize Assistants for Virtual Coach -====================================== - -You can extend the current capabilities of Coach by adding your own custom assistants as Javascript extensions. You're going to need a Github account to get started. If you don’t have one, follow the steps by visiting this web page to create: https://docs.github.com/en/get-started/start-your-journey/creating-an-account-on-github - -Once you’re signed in to your Github account, you will be able to create, install and test your very own custom AI assistant with Coach. - -Customize/Use an existing custom assistant as a Javascript extension --------------------------------------------------------------------- - -1. Click this link to head over to the Codio Extensions Github Page - https://github.com/codio-extensions and scroll down to the Repositories section. - -.. image:: /img/codio-extension-virtual-coach.png - :alt: Codio-extensions - -2. Choose one of repositories that starts with **custom-assistant-example-** - -.. Note:: These examples are experimental and may receive small improvements and updates. If you’re using them as is, please check the respective github repositories for the latest release available. - -3. Click on the green **Use This Template** button or the `Fork `_ button, in the top right corner, to create a copy of the example repo, and give it a unique name - This will be your own copy of the custom assistant where you can make edits to the example code to customize your assistant. - - a. You'll see 2 files in your repo: - - i. **metadata.json**: This file will contain some basic information about your extension: - - 1. **name**: The name of your extension - rename this field to describe what your assistant will do - 2. **type**: For any Coach extension, the default value is “helper” - 3. **user_type**: Describes who will be able to see the extension - one of 3 possible values: “learner”, “instructor”, “all” - 4. **component**: For any Coach extension, the default value is "all" - - ii. **index.js**: This file will contain the Javascript code for the extension. +- **Next Steps Hint**: Provides students with ideas for the next steps they can take to complete their assignment. - b. The **index.js** file has example code of how you can use the `Coach API `_ to create your own assistant. +.. image:: /img/vc-and-extensions/coach-assignment-settings.png + :alt: Assignment settings for Virtual Coach -4. Edit the **metadata.json** file (rename the extension, choose **user_type**). Save and commit the changes to your branch. -5. Refer to the `API documentation `_ and edit the **index.js** file with the Javascript code for your assistant. +When a student clicks on the Virtual Coach icon in the bottom right corner, a dialog opens, and they can see the assistants you have enabled. If there is no :ref:`Guide ` in the assignment, only error message augmentation will be available. -.. _create-a-release: -Creating a Release -~~~~~~~~~~~~~~~~~~ -Now that the code for the extension is complete, you’ll have to create a **Release** for your repository, making it deployable and ready to use. - -1. Navigate back to your repository and on the right panel, click on “Create a new release”. +Students may select one of the options presented by the Coach to receive more information. +.. image:: /img/vc-and-extensions/student-view-coach.png + :alt: The student view of Virtual Coach -.. image:: /img/creating-a-release-virtual-coach.png - :alt: create-release-example -2. On this page, in the tags field, write and create a new tag by referring to the tagging suggestions on the right panel. Enter a name and description for this release, and click on the **Publish release** button at the very bottom of the page. +What they will see if they select **Summarize Prompt**: -.. image:: /img/publish-release-virtual-coach.png - :alt: publish-release-example +.. image:: /img/vc-and-extensions/student-vc-summary.png + :alt: The student view of an assignment summary in Virtual Coach -.. Note:: If you’ve made any changes, updates or edits to your code files (**index.js** or **metadata.js**) after creating a release, you will need to create a new release in order to propagate those changes to your custom assistant. -.. _deploy-your-assistant: +If error text is output to the terminal, students will need to paste the text of the error message in the prompt field in Virtual Coach. -Deploying a custom assistant to your organization -------------------------------------------------- -Now that you have authored and tested your very own custom AI assistant, let’s look at the steps to deploy it in your organization: +If an error message is not provided, the student will receive the following: "The provided text does not look like an error message. Please paste an error message below." If the student still does not provide an error message, they will be returned to the first screen with three buttons. -1. Navigate to your extension’s Github repository and copy the webpage URL: it should look something like this: `https://github.com//` +.. image:: /img/vc-and-extensions/student-vc-error.png + :alt: The student view of an error explanation in Virtual Coach -2. Login to your Codio account, and click on your username or Avatar on the bottom left corner of your screen to open Account Settings. -3. Click on Organizations and choose an Organization that you’re an owner of - this is how you’ll be able to set up your assistant as an extension. If you’re not an owner, contact your Organization Admin to help you set it up. +.. note:: Standard and Advanced Code tests have an additional "Explain this error" button that will appear if Error Augmentation is on and running a code test results in an error state. -4. Now click on Extensions, and then click on the Add extension button. +Students can provide feedback on the Virtual Coach's responses by using the thumbs up or thumbs down icon. +The Virtual Coach window may be resized by dragging the resize handle in the upper left corner. -5. Paste the URL of your Github repository’s webpage that you copied in step 1, and click Add Extension. You should now see it pop up as an Inactive Extension. To deploy the assistant to your account, click Use. Now it is active and deployed in your organization. +There are two ways to review how the Virtual Coach interacts with students: +1. Export Virtual Coach logs using the Codio API ``codio.course.exportCoachData(courseId)``. For more information on Codio APIs, see `Codio JS API `_ -.. Note:: **This is an experimental feature**. BY adding an assistant to your organization, it will automatically be available to be toggled on/off in every course in that organization. It will appear as an assignment level setting, in the Virtual Coach section. +2. Export the Course Coach Log Data from the **Export** tab for the course. For more information, see :ref:`Course Coach Log Data ` -Applying updates to a custom assistant after creating a new release -------------------------------------------------------------------- - -Once you’ve made more edits to your code files and created a new release, here’s how you can apply the updates to your assistant: - - 1. Login to your Codio account, and click on your username or Avatar on the bottom left corner of your screen to open Account Settings. - 2. Click on Organizations and choose an Organization that you’re an owner of - this is how you’ll be able to set up your assistant as an extension. If you’re not an owner, contact your Organization Admin to help you set it up. - 3. Now click on Extensions. You should be able to see your Custom Assistant under Active Extensions. - 4. Click on the Check for Updates button in the top right corner. - 5. If there are any updates to be applied, you will be prompted to do so! - -Authoring your own custom assistant as a Javascript extension -------------------------------------------------------------- - -1. Click this link to head over to the Coach Custom Assistant Template repository - -https://github.com/codio-extensions/coach-custom-assistant-template-simple - - - .. image:: /img/create-a-new-repository.png - :alt: Coach extensions example Github repository - -.. 2. Click on the green `Fork `_ button, in the top right corner, to fork your own copy of the example repo, and give it a unique name - This is where you will be making the edits to the example code to create your custom assistant. - -2. Click on the green **Use This Template** button in the top right corner, and select **Create a new repository** from the drop down menu to create your own repo from the template. Now pick an owner for this repository, give it a unique name and click **Create Repository** - This is where you will be making the edits to the template code to create your own custom assistant. - - a. You'll see 2 files in your repo: - - i. **metadata.json**: This file will contain some basic information about your extension: - - 1. **name**: The name of your extension - rename this field to describe what your assistant will do - 2. **type**: For any Coach extension, the default value is “helper” - 3. **user_type**: Describes who will be able to see the extension - choose one of 3 possible values: “learner”, “instructor”, “all” - 4. **component**: For any Coach extension, the default value is "all" - - ii. **index.js**: This file will contain the Javascript code for the extension. - - b. The **index.js** file has boilerplate code of how you can use the `Coach API `_ to create your own assistant. - - -3. Edit the **metadata.json** file (rename the extension, choose **user_type**). Save and commit the changes to your branch. - -4. Refer to the `API documentation `_ and edit the **index.js** file with the Javascript code for your assistant. The example gives some context about the API elements and how you can use them. Save and commit the changes to your branch. - -5. Now that the code for the extension is complete, you’ll have to create a **Release** for your repository, making it deployable and ready to use. Follow the steps in the -:ref:`Creating a Release` section above. - - -6. And finally, follow the steps in the :ref:`Deploying a custom assistant` section to add the custom assistant to your organization. - -.. Note:: **This is an experimental feature.** By adding an assistant to your organization, it will automatically be available to be toggled on/off in every course in that organization. It will appear as an assignment level setting, in the Virtual Coach section. - -Using your own LLMs in custom assistants via Codio’s LLM Proxy --------------------------------------------------------------- - -If you’d prefer sending API requests to your own LLMs (commercial or open-source) instead of Codio’s built-in Anthropic LLMs, you can do so by leveraging your Organization Level LLM API keys via Codio’s LLM Proxy. - -Please refer to our documentation on adding LLM API keys to your Codio Organization and enabling it for a course. -`Large Language Models in Codio `_ - -Once the API keys are set up and LLMs are enabled in your course, refer to the Coach Custom Assistants `API Reference `_ to send requests and fetch responses from your own LLMs! - -Testing your custom assistant using Development Mode ------------------------------------------------------ - -If you’d like to test your assistant before deploying it to your organization, you can use the Extension Development Mode to test it. - - - 1. Navigate to your extension's Github repository, click on the green `/` button, then click on SSH and copy the displayed URL. - - 2. Now, go back to your repository’s home page, click on the **metadata.json** file and copy its contents. - - 3. Login to your Codio account, click on My Projects on the left panel, and then click New Project on the top left. - - 4. In the select your starting point section, click Import and then paste the URL you copied in Step 1 in the URL field, and give your project a name in the Add some details section. - - 5. Make the Project visibility Public, and click Create. This will automatically open the Project as well. - - 6. Now, you should see the 'index.js' file in the filetree on the left. Right click on it, and select Preview Static in the drop down menu. - - 7. This will open the file and display a web URL. Copy this web URL. - - 8. Go back to the homepage of your Codio account and click on your username or Avatar on the bottom left corner of your screen to open Account Settings. - - 9. Now click on **Extensions** at the bottom of the list, and scroll down to the Development mode section. - - .. image:: /img/extensions-virtual-coach.png - :alt: extensions example Github repository +.. _enable-vc-bulk: - 10. Paste the **index.js** webpage URL that you copied in Step 1 in the Source Code URL field +Using Bulk Settings to Enable or Disable Assistants +=================================================== - 11. Paste the contents of the metadata.json file that you copied in Step 2 in the **metadata** section, and click **Save changes**. +You can enable or disable assistants for all assignments in a course using a CSV file, see :ref:`Bulk Assignment Update ` -Now you can open any of your assignments or projects and your extension should be visible as a menu item in Coach. Test away, make changes and once you’re happy with it, :ref:`create a release` and :ref:`deploy your assistant`! +- The CSV template for bulk assignment settings upload includes columns for each Virtual Coach assistant and any custom extensions you have. +- The column values in the CSV file can be set to TRUE to enable assistants for any assignments in the course, and FALSE to disable them. +Using Course Settings to Enable or Disable Assistants +===================================================== -.. Note:: By adding an extension to **your** account or testing it in Development mode, it will **only** be visible to **you**, and **not** your students, even If you’ve chosen “learner” or “all” as the **user_type** in the **metadata.json** file. This will let you test your assistant, giving you the ability to make changes to it before deploying it for your organization. +You can enable or disable assistants at the :ref:`course level `. Course-level settings override assignment-level settings. If you activate an extension at the course level, you cannot disable it for individual assignments. +.. note:: For more information about creating custom Virtual Coach assistants see :ref:`Custom Assistants for Virtual Coach `. \ No newline at end of file diff --git a/source/instructors/setupcourses/course-coach-settings.rst b/source/instructors/setupcourses/course-coach-settings.rst new file mode 100644 index 00000000..c84b9c0e --- /dev/null +++ b/source/instructors/setupcourses/course-coach-settings.rst @@ -0,0 +1,16 @@ +.. meta:: + :description: Turn on Coach settings for the entire course + + +.. _course-coach-settings: + + +Extension Settings for a Course +=============================== + +From the **Extensions** tab in the **Admin** section of your Course menu, you can enable Codio :ref:`Virtual Coach ` extensions and custom :ref:`organization extensions ` at the course level. + +.. important:: Extensions enabled at the course level cannot be disabled at the assignment level. If you prefer selective enablement per assignment, use the :ref:`bulk assignment update ` feature or configure extensions for each assignment. + +.. image:: /img/course_settings/course-level-extensions.png + :alt: Course-level Extensions Settings \ No newline at end of file diff --git a/source/instructors/setupcourses/courses.rst b/source/instructors/setupcourses/courses.rst index 7cf08613..68fadf1f 100644 --- a/source/instructors/setupcourses/courses.rst +++ b/source/instructors/setupcourses/courses.rst @@ -45,6 +45,8 @@ Courses Set Up virtualmachine common-storage course-llm + course-coach-settings + custom-coach-extensions A course is a grouping of students who are taught as a logical group. One of the main tasks for instructors is to create the courses for their students, and then add content (modules and assignments), share it with others, add teachers and students to it, and other tasks. With courses, you can instantly access student code and projects. diff --git a/source/instructors/setupcourses/custom-coach-extensions.rst b/source/instructors/setupcourses/custom-coach-extensions.rst new file mode 100644 index 00000000..baa93639 --- /dev/null +++ b/source/instructors/setupcourses/custom-coach-extensions.rst @@ -0,0 +1,136 @@ +.. meta:: + :description: Virtual Coach is an AI tool for assisting students with explanations, error messages, and hints. + + +.. _custom-coach-extensions: + +Custom Assistants for Virtual Coach +=================================== + +You can extend the current capabilities of Virtual Coach by adding your own custom assistants as JavaScript extensions. You will need a GitHub account to get started. If you don't have one, follow the steps in the `GitHub documentation `_. + +Once you're signed in to your GitHub account, you will be able to create, install and test your custom AI assistant with Virtual Coach. + +Customize or Use an Existing Custom Assistant as a JavaScript Extension +----------------------------------------------------------------------- + +1. Click this link to view the `Codio Extensions GitHub repository `_ and scroll down to the Repositories section. + +.. image:: /img/codio-extension-virtual-coach.png + :alt: Codio-extensions + +2. Choose one of the repositories that starts with **custom-assistant-example-** + +.. note:: These examples are experimental and may receive small improvements and updates. If you're using them as is, please check the respective GitHub repositories for the latest release available. + +3. Click on the green **Use This Template** button or the `Fork `_ button in the top right corner to create a copy of the example repository. Give it a unique name—this will be your own copy of the custom assistant where you can make edits to the example code to customize your assistant. + You'll see two files in your repo: + - ``metadata.json``: This file will contain some basic information about your extension: + 1. **name**: The name of your extension - rename this field to describe what your assistant will do + 2. **type**: For any Virtual Coach extension, the default value is “helper” + 3. **user_type**: Describes who will be able to see the extension - one of 3 possible values: “learner”, “instructor”, “all” + 4. **component**: For any Virtual Coach extension, the default value is "all" + - ``index.js``: This file will contain the JavaScript code for the extension. + +4. Edit the ``metadata.json`` file (rename the extension, choose **user_type**). Save and commit the changes to your branch. + +5. Refer to the `API documentation `_ and edit the ``index.js`` file with the JavaScript code for your assistant. + +.. _create-a-release: + +Creating a Release +~~~~~~~~~~~~~~~~~~ + +When the code for the extension is complete, you'll need to create a **Release** for your repository, making it deployable and ready to use. + +1. Navigate back to your repository and on the right panel, click on "Create a new release". + +.. image:: /img/creating-a-release-virtual-coach.png + :alt: create-release-example + +2. On this page, create a new tag in the tags field (refer to the tagging suggestions on the right panel for guidance). Enter a name and description for this release, and click the **Publish release** button at the bottom of the page. + +.. image:: /img/publish-release-virtual-coach.png + :alt: publish-release-example + + +.. important:: If you've made any changes, updates, or edits to your code files (``index.js`` or ``metadata.json``) after creating a release, you need to create a new release to propagate those changes to your custom assistant. + +.. _deploy-your-assistant: + +Deploying a Custom Assistant to Your Organization +------------------------------------------------- + +Now that you have authored and tested your custom AI assistant, follow these steps to deploy it in your organization: + +1. Navigate to your extension's GitHub repository and copy the webpage URL: it should look something like this: ``https://github.com//`` + +2. Log in to your Codio account, and click on your username in the upper right corner and select **Organizations** from the menu. + +3. Choose an Organization that you're an owner of - this is how you'll set up your assistant as an extension. If you're not an owner, contact your Organization Admin to help you set it up. + +4. Now click on :ref:`Extensions `, and then click on the **Add extension** button. + +5. Paste the URL of your GitHub repository's webpage that you copied in step 1, and click **Ok**. You should now see it pop up as an Inactive Extension. To deploy the assistant to your account, click the plug icon. Now it is active and deployed in your organization. + + +.. note:: **This is an experimental feature**. Adding an assistant to your organization will make it available to be toggled on or off in every course in that organization. + +Applying Updates to a Custom Assistant After Creating a New Release +------------------------------------------------------------------- + +Once you've made more edits to your code files and created a new release, here's how you can apply the updates to your assistant: + +1. Log in to your Codio account, and click on your username in the upper right corner of your screen and select **Organizations**. +2. Choose an Organization that you're an owner of - this is how you'll be able to set up your assistant as an extension. If you're not an owner, contact your Organization Admin to help you set it up. +3. Now click on :ref:`Extensions `. You should be able to see your Custom Assistant under Active Extensions. +4. Click on the **Check for Updates** button in the top-right corner. +5. If there are any updates to be applied, you will be prompted to do so. + +Using Your Own LLMs in Custom Assistants via Codio's LLM Proxy +-------------------------------------------------------------- + +You can use your own LLM (commercial or open-source) instead of Codio's built-in Anthropic LLM by leveraging your Organization Level LLM API keys via Codio's LLM Proxy. + +Please refer to our documentation on adding LLM API keys to your Codio Organization and enabling it for a course. +`Large Language Models in Codio `_ + +Once the API keys are set up and LLMs are enabled in your course, refer to the Virtual Coach Custom Assistants `API Reference `_ to send requests and fetch responses from your own LLMs! + +Testing Your Custom Assistant Using Development Mode +---------------------------------------------------- + +If you'd like to test your assistant before deploying it to your organization, you can use the Extension Development Mode to test it. + + +1. Navigate to your extension's GitHub repository, click on the green **Code** button, then click on SSH and copy the displayed URL. + +2. Now, go back to your repository's home page, click on the ``metadata.json`` file and copy its contents. + +3. Log in to your Codio account, select **My Projects** from the **Build** menu and click the **New Project** button. + +4. In the **Select your Starting Point** section, click **Import** and then paste the URL you copied in Step 1 in the URL field, and give your project a name in the **Add Details** section. + +5. In the **Select the visibility** section, choose **Public**, and click **Create**. Your project will be opened. + +6. Now, you should see the ``index.js`` file in the filetree on the left. Right-click (or Ctrl-click) on it, and select **Preview Static** in the drop-down menu. + +7. This will open the file and display a URL. Copy this URL. + +8. Go back to the homepage of your Codio account and click on your username in the upper-right corner of your screen and select **Preferences**. + +9. Now click on **Extensions** at the bottom of the list, and scroll down to the Development mode section. + +.. image:: /img/vc-and-extensions/preference-extensions.png + :alt: Development Mode for testing extensions + +10. Paste the ``index.js`` URL that you copied in Step 7 in the Source Code URL field. + +11. Paste the contents of the ``metadata.json`` file that you copied in Step 2 in the **metadata** section, and click **Save changes**. + +Now you can open any of your assignments or projects and your extension will be visible as a menu item in Virtual Coach. You can test and make changes and once you're happy with it, :ref:`create a release` and :ref:`deploy your assistant`. + + +.. note:: By adding an extension to your account or testing it in Development mode, it will only be visible to you and not your students—regardless of the **user_type** in ``metadata.json``. This allows you to test and refine your assistant before deploying it to your organization. + +