This is a temporary archive of the Deephaven documentation. For latest documentation please see https://deephaven.io/.
Skip to main content
Version: Java (Groovy)

Deephaven's GitHub Copilot extension

Deephaven's GitHub Copilot extension gives users direct access to an AI model trained specifically on Deephaven's documentation and codebase. You can leverage the extension for things like:

  • Auto-completion for Deephaven-specific code snippets.
  • Writing Deephaven queries using natural language.
  • Proofreading, refactoring, and suggesting improvements to your Deephaven code.
  • Reviewing, critiquing, and providing feedback on your queries.
  • Answering questions about Deephaven's API and features.
  • And more!

Prerequisites

There are only two prerequisites to use the Deephaven GitHub Copilot extension:

Recommendations

On top of the prerequisites, it's recommended to install one or more of the IDEs supported by GitHub Copilot. They include:

If you use Visual Studio Code, it's also recommended you install the Deephaven Extension, as it allows you to connect to running Deephaven servers to execute queries from the IDE directly. This makes using and testing Copilot's suggestions simpler and easier.

Installation

Installation is simple - follow these steps to get started:

  1. Install GitHub Copilot

Head to github.com/features/copilot and get started with the plan of your choice - Free, Pro, Business, or Enterprise. If you already have this installed, you can skip this step.

  1. Install Deephaven

If you do not yet have Deephaven installed, there are several ways to get started.

For Python:

For Java/Groovy:

  1. Install the Deephaven GitHub Copilot extension

Head to github.com/apps/deephaven, and click the big green Install button. Follow the instructions to install the extension.

  1. Install any recommended IDEs you wish to use

See the Recommendations section above for a list of IDEs that support GitHub Copilot. Follow the instructions provided for whichever IDE(s) you choose to install.

  1. Install GitHub Copilot in your IDE

Copilot is a plugin for any of the IDEs listed above. See the following links for the Copilot plugin in each:

Once these steps are completed, you're ready to go!

Usage

When querying the Deephaven GitHub Copilot extension, preface your queries with @deephaven to tell it you're asking a Deephaven-specific question.

Examples

The following examples show how to use the Deephaven GitHub Copilot extension effectively.

Knowledge reference

Copilot is a great tool for learning about core concepts. For example, ask Deephaven about the difference between a Dynamic Table Writer and a Table Publisher:

Knowledge reference

Natural language queries

Have it write entire queries for you based on natural language descriptions. For example, ask it to write code that creates a ticking table with sine and cosine waves. Not only do you get the code, you also get an explanation and a plot to show that it works as intended:

Natural language query

Semantic search of documentation and code

Want a succinct summary of documentation and/or source code? Just ask! For example, ask it to point you to the documentation on a Table iterator. Not only do you get the link to the documentation, it also provides a summary:

Semantic search

File context

The tool has file context, meaning you can ask it to review, generate, or critique code based on file input, the current selection, what's in the editor, and more. For example, here's Copilot explaining this query:

File context