Gemini in Colab Enterprise

This document describes how Gemini in Colab Enterprise, which is part of Gemini for Google Cloud, provides AI-powered assistance to help you write and edit code in notebooks.

AI assistance with Gemini in Colab Enterprise

Gemini in Colab Enterprise provides AI assistance to help you do the following:

  • Chat about your notebook (Preview): Use a chat dialog to help you understand and develop your notebook. You can chat with Gemini about potential coding solutions or how to do specific tasks in your notebook. You can also get explanations of the code in a notebook. For more information, see Chat about your notebook with Gemini.
  • Write code by using code completion and code generation: Gemini in Colab Enterprise suggests code segments while you type in a code cell. You can also use Gemini in Colab Enterprise to generate code based on a description of what you want. For more information, see Use code completion and code generation.
  • Explain code cells (Preview): Use Gemini in Colab Enterprise to get explanations of code cells. The explanations can include sources and suggested improvements to the code. Use the chat dialog to ask follow-up questions. For more information, see Explain code cells.
  • Explain and fix errors (Preview): Gemini in Colab Enterprise suggests fixes for syntax errors and provides explanations of other errors. The explanations can include sources and suggested code snippets for resolving the error. Use the chat dialog to ask follow-up questions. For more information, see Explain and fix errors.

Learn how and when Gemini for Google Cloud uses your data. As an early-stage technology, Gemini for Google Cloud products can generate output that seems plausible but is factually incorrect. We recommend that you validate all output from Gemini for Google Cloud products before you use it. For more information, see Gemini for Google Cloud and responsible AI.

Where to interact with Gemini

After you set up Gemini in Colab Enterprise, you can use Gemini in Colab Enterprise to do the following in Colab Enterprise:

  • To chat about your notebook with Gemini, open a Colab Enterprise notebook, and then click the  Show Gemini button. Start discussing your notebook in the chat dialog.
  • To use code completion and code generation, do any of the following:

    • To use code completion, start typing in a code cell to see code completion suggestions.
    • To use code generation, click  Available AI features, and then click Generate code. Enter a description of the code that you want to generate, and then press Enter.
  • To get explanations of code cells, go to the cell that you want to explain, click  Available AI features, and then click Explain code.

  • To explain and fix errors, do any of the following:

    • To use a suggested fix for a syntax error, click the Fix error button, and then accept the suggested edit.
    • To get an explanation of an error, click the Explain error button.

Set up Gemini in Colab Enterprise

For detailed setup steps, see Set up Gemini in Colab Enterprise.

What's next