|
| 1 | +--- |
| 2 | +meta: |
| 3 | + title: How to query code models |
| 4 | + description: Learn how to interact with powerful language models specialized in code using Scaleway's Generative APIs service. |
| 5 | +content: |
| 6 | + h1: How to query code models |
| 7 | + paragraph: Learn how to interact with powerful language models specialized in code using Scaleway's Generative APIs service. |
| 8 | +tags: generative-apis ai-data language-models code-models chat-completions-api |
| 9 | +dates: |
| 10 | + validation: 2024-12-09 |
| 11 | + posted: 2024-12-09 |
| 12 | +--- |
| 13 | + |
| 14 | +Scaleway's Generative APIs service allows users to interact with powerful code models hosted on the platform. |
| 15 | + |
| 16 | +Code models are inherently language models specialized in **understanding code**, **generating code** and **fixing code**. |
| 17 | + |
| 18 | +As such, they will be available through the same interfaces as language models: |
| 19 | +- The Scaleway [console](https://console.scaleway.com) provides complete [playground](/ai-data/generative-apis/how-to/query-language-models/#accessing-the-playground), aiming to test models, adapt parameters, and observe how these changes affect the output in real-time. |
| 20 | +- Via the [Chat API](/ai-data/generative-apis/how-to/query-language-models/#querying-language-models-via-api) |
| 21 | +For more information on how to query language models, read [our dedicated documentation](/ai-data/generative-apis/how-to/query-language-models/). |
| 22 | + |
| 23 | +Code models are also ideal AI assistants when added to IDEs (integrated development environments). |
| 24 | + |
| 25 | +<Macro id="requirements" /> |
| 26 | + |
| 27 | +- A Scaleway account logged into the [console](https://console.scaleway.com) |
| 28 | +- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization |
| 29 | +- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) for API authentication |
| 30 | +- An IDE such as VS Code or JetBrains |
| 31 | + |
| 32 | +## Install Continue in your IDE |
| 33 | + |
| 34 | +[Continue](https://www.continue.dev/) is an [open-source code assistant](https://github.com/continuedev/continue) to connect AI models to your IDE. |
| 35 | + |
| 36 | +To get Continue, simply hit `install` |
| 37 | +- on the [Continue extension page in Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Continue.continue) |
| 38 | +- or on the [Continue extension page in JetBrains Marketplace](https://plugins.jetbrains.com/plugin/22707-continue) |
| 39 | + |
| 40 | +## Configure Scaleway as an API provider in Continue |
| 41 | + |
| 42 | +Continue's `config.json` file will set models and providers allowed for chat, autocompletion etc. |
| 43 | +Here is an example configuration with Scaleway's OpenAI-compatible provider: |
| 44 | + |
| 45 | +```json |
| 46 | +"models": [ |
| 47 | + { |
| 48 | + "model": "qwen2.5-coder-32b-instruct", |
| 49 | + "title": "Qwen2.5-coder", |
| 50 | + "apiBase": "https://api.scaleway.ai/v1/", |
| 51 | + "provider": "openai", |
| 52 | + "apiKey": "###SCW SECRET KEY###", |
| 53 | + "useLegacyCompletionsEndpoint": false |
| 54 | + } |
| 55 | +] |
| 56 | +``` |
| 57 | + |
| 58 | +<Message type="tip"> |
| 59 | + The config.json file is typically stored as $HOME/.continue/config.json on Linux/macOS systems, and %USERPROFILE%\.continue\config.json on Windows. |
| 60 | +</Message> |
| 61 | + |
| 62 | +Read more about how to set up your `config.json` on the [official Continue documentation](https://docs.continue.dev/reference). |
| 63 | + |
0 commit comments