-
Notifications
You must be signed in to change notification settings - Fork 258
feat(genai): add content for Continue Dev documentation for GenAPIs #4414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
402cb46
feat(genai): add content
bene2k1 ece78c3
feat(genapi): content
bene2k1 b1f0fe7
feat(genapi): add examples
bene2k1 a4bf831
fix(genapi): fix typo
bene2k1 27d4bcf
feat(genapi): add content
bene2k1 c6af8f0
feat(genapi): content
bene2k1 94928cc
Apply suggestions from code review
bene2k1 a8a5004
Apply suggestions from code review
bene2k1 7826a24
Apply suggestions from code review
bene2k1 5b8399d
Apply suggestions from code review
bene2k1 f625d66
Update pages/generative-apis/how-to/query-code-models.mdx
bene2k1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 120 additions & 0 deletions
120
pages/generative-apis/reference-content/adding-ai-to-intellij-using-continue.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| --- | ||
| meta: | ||
| title: Adding AI to IntelliJ IDEA using Continue and Generative APIs | ||
| description: Learn how to integrate AI-powered code models into IntelliJ IDEA with Continue and Scaleway's Generative APIs. | ||
| content: | ||
| h1: Adding AI to IntelliJ IDEA using Continue and Generative APIs | ||
| paragraph: Improve your coding efficiency by integrating AI-powered code models into IntelliJ IDEA. With Continue and Scaleway's Generative APIs, you can use AI to understand, generate, and optimize code. | ||
| tags: generative-apis, ai, machine-learning, language-models, code-assistance, intellij-idea, continue | ||
| validation_date: 2025-02-14 | ||
| posted_date: 2025-02-14 | ||
| --- | ||
|
|
||
| AI-driven coding is revolutionizing software development by automating repetitive tasks, generating code snippets, improving code quality, and identifying potential bugs. | ||
| By integrating AI-powered tools, developers can significantly enhance productivity and optimize workflows. | ||
| This guide will help you integrating AI-powered code models into JetBrain's IntelliJ IDEA using Continue and Scaleway’s Generative APIs. | ||
bene2k1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <Macro id="requirements" /> | ||
|
|
||
| - A Scaleway account logged into the [console](https://console.scaleway.com) | ||
| - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization | ||
| - A valid [API key](/iam/how-to/create-api-keys/) for API authentication | ||
| - Installed [IntelliJ IDEA](https://www.jetbrains.com/idea/) on your local machine. | ||
|
|
||
| ## Install Continue in IntelliJ IDEA | ||
|
|
||
| You can install Continue from [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/22707-continue): | ||
bene2k1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. Open IntelliJ IDEA and go to **Preferences** (`Ctrl+Alt+S` on Windows/Linux, `Cmd+,` on macOS). | ||
| 2. Navigate to **Plugins** > **Marketplace**. | ||
bene2k1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 3. Search for **Continue** and click **Install**. | ||
| 4. Restart IntelliJ IDEA after installation. | ||
|
|
||
| ### Configure Continue to use Scaleway’s Generative APIs | ||
|
|
||
| To link Continue with Scaleway’s Generative APIs, you need to configure the settings file: | ||
|
|
||
| 1. Locate your Continue configuration directory: | ||
| - **Linux/macOS**: `~/.continue/` | ||
| - **Windows**: `%USERPROFILE%\.continue\` | ||
| 2. Create a `config.json` file inside this directory. | ||
| 3. Add the following configuration: | ||
| ```json | ||
| { | ||
| "models": [ | ||
| { | ||
| "model": "qwen2.5-coder-32b-instruct", | ||
| "title": "Qwen2.5 Coder", | ||
| "provider": "scaleway", | ||
| "apiKey": "###SCW_SECRET_KEY###" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
| 4. Save the file and restart IntelliJ IDEA. | ||
|
|
||
| <Message type="tip"> | ||
| For more details on configuring `config.json`, refer to the [official Continue documentation](https://docs.continue.dev/reference). | ||
| </Message> | ||
|
|
||
| ### Activate Continue in IntelliJ IDEA | ||
|
|
||
| After configuring the API, activate Continue in IntelliJ IDEA: | ||
|
|
||
| - Open the **Command Search** (`Shift+Shift` on Windows/Linux/macOS). | ||
| - Type `"Continue"` and select the appropriate command to enable AI-powered assistance. | ||
|
|
||
| ## Using Continue for AI-powered coding | ||
|
|
||
| Once Continue is configured, you can leverage AI capabilities to streamline development. Below are some key features: | ||
|
|
||
| ### AI-assisted code generation | ||
|
|
||
| Use the **Continue: Generate Code** command to generate boilerplate code, functions, or even entire classes based on natural language prompts. | ||
bene2k1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| #### Example: | ||
|
|
||
| - Input Prompt: *"Create a Java method to validate an email address."* | ||
| - AI-generated output: | ||
| ```java | ||
| import java.util.regex.Pattern; | ||
|
|
||
| public class EmailValidator { | ||
| private static final String EMAIL_REGEX = "^[A-Za-z0-9+_.-]+@[A-Za-z0-9.-]+$"; | ||
| private static final Pattern pattern = Pattern.compile(EMAIL_REGEX); | ||
|
|
||
| public static boolean isValidEmail(String email) { | ||
| return pattern.matcher(email).matches(); | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### Intelligent code completion | ||
|
|
||
| Continue enhances your coding workflow with AI-driven code completion. Simply start typing, and the AI model will suggest and complete your code efficiently. | ||
|
|
||
| ### Automated code refactoring | ||
|
|
||
| Refactoring is crucial for maintaining clean and efficient code. Use the *Continue: Refactor Code* command to enhance readability and optimize performance. | ||
bene2k1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| #### Example | ||
|
|
||
| - Before refactoring: | ||
| ```java | ||
| public int calculateSum(int a, int b) { | ||
| int result = a + b; | ||
| return result; | ||
| } | ||
| ``` | ||
|
|
||
| - After AI-driven refactoring: | ||
| ```java | ||
| public int calculateSum(int a, int b) { | ||
| return a + b; | ||
| } | ||
| ``` | ||
|
|
||
| ## Conclusion | ||
|
|
||
| By integrating Continue with Scaleway’s Generative APIs, you unlock AI-powered coding capabilities that enhance productivity, automate repetitive tasks, and improve code quality. | ||
|
|
||
106 changes: 106 additions & 0 deletions
106
pages/generative-apis/reference-content/adding-ai-to-vscode-using-continue.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| --- | ||
| meta: | ||
| title: Adding AI to VS Code using Continue and Generative APIs | ||
| description: Learn how to integrate AI-powered code models into VS Code with Continue and Scaleway's Generative APIs. | ||
| content: | ||
| h1: Adding AI to VS Code using Continue and Generative APIs | ||
| paragraph: Elevate your coding experience by integrating AI-powered code models into VS Code. With Continue and Scaleway's Generative APIs, you can leverage AI to understand, generate, and optimize code with ease. | ||
| tags: generative-apis, ai, machine-learning, language-models, code-assistance, vs-code, continue | ||
| validation_date: 2025-02-14 | ||
| posted_date: 2025-02-14 | ||
| --- | ||
|
|
||
| AI-powered coding is transforming software development by automating repetitive tasks, generating code, improving code quality, and even detecting and fixing bugs. By integrating AI-driven tools, developers can significantly boost productivity and streamline their workflows. | ||
| This guide provides a step-by-step guide on how to integrate AI-powered code models into VS Code using Continue and Scaleway's Generative APIs. | ||
|
|
||
| <Macro id="requirements" /> | ||
|
|
||
| - A Scaleway account logged into the [console](https://console.scaleway.com) | ||
| - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization | ||
| - A valid [API key](/iam/how-to/create-api-keys/) for API authentication | ||
| - Installed [Visual Studio Code](https://code.visualstudio.com/) on your local machine | ||
|
|
||
| ## Install Continue in VS Code | ||
|
|
||
| You can install Continue directly from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or via the command line: | ||
|
|
||
| ```bash | ||
| code --install-extension continue.continue | ||
| ``` | ||
|
|
||
| ### Configure Continue to Use Scaleway’s Generative APIs | ||
bene2k1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| To link Continue with Scaleway's Generative APIs, you need to configure a settings file: | ||
|
|
||
| - Create a `config.json` file inside your `.continue` directory. | ||
| - Add the following configuration to enable Scaleway's Generative API: | ||
| ```json | ||
| { | ||
| "models": [ | ||
| { | ||
| "model": "qwen2.5-coder-32b-instruct", | ||
| "title": "Qwen2.5 Coder", | ||
| "provider": "scaleway", | ||
| "apiKey": "###SCW_SECRET_KEY###" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
| - Save the file at the correct location: | ||
| - Linux/macOS: `~/.continue/config.json` | ||
| - Windows: `%USERPROFILE%\.continue\config.json` | ||
|
|
||
| <Message type="tip"> | ||
| For more details on configuring `config.json`, refer to the [official Continue documentation](https://docs.continue.dev/reference). | ||
| </Message> | ||
|
|
||
| ### Activate Continue in VS Code | ||
|
|
||
| After configuring the API, open VS Code and activate Continue: | ||
|
|
||
| - Open the **Command Palette** (`Ctrl+Shift+P` on Windows/Linux, `Cmd+Shift+P` on Mac) | ||
| - Type `"Continue"` and select the appropriate command to enable AI-powered assistance. | ||
|
|
||
| ## Using Continue for AI-powered coding | ||
|
|
||
| Once Continue is configured, you can leverage AI capabilities to streamline development. Below are some key features: | ||
|
|
||
| ### AI-assisted code generation | ||
|
|
||
| Use the "Continue: Generate Code" command to generate boilerplate code, functions, or even entire classes based on natural language prompts. | ||
|
|
||
| #### Example | ||
|
|
||
| - Input prompt: *"Create a Python function to merge two sorted lists"* | ||
| - AI-Generated output: | ||
| ```python | ||
| def merge_sorted_lists(list1, list2): | ||
| return sorted(list1 + list2) | ||
| ``` | ||
|
|
||
| ### Intelligent code completion | ||
|
|
||
| Continue enhances your coding workflow with AI-driven code completion. Simply start typing, and the AI model will predict and complete your code. | ||
|
|
||
| ### Automated code refactoring | ||
|
|
||
| Refactoring is essential for maintaining clean and efficient code. Use the *"Continue: Refactor Code"* command to improve readability and optimize performance. | ||
|
|
||
| #### Example | ||
|
|
||
| - Before refactoring: | ||
| ```python | ||
| def add_numbers(a, b): | ||
| result = a + b | ||
| return result | ||
| ``` | ||
|
|
||
| - After AI-Driven refactoring: | ||
bene2k1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ```python | ||
| def add_numbers(a, b): | ||
| return a + b | ||
| ``` | ||
|
|
||
| ## Conclusion | ||
|
|
||
| By integrating Continue with Scaleway’s Generative APIs, you unlock AI-powered coding capabilities that enhance productivity, automate repetitive tasks, and improve code quality. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.