Skip to content

Commit 7603fea

Browse files
authored
Merge branch 'main' into int-feat-k8s-readd-sbs-migration-doc
2 parents efe94a1 + 4f1ae8f commit 7603fea

File tree

1,058 files changed

+14397
-8333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,058 files changed

+14397
-8333
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Check links on schedule
2+
on:
3+
schedule:
4+
- cron: "59 23 * * 0" # Runs every Sunday at 23:59 PM
5+
jobs:
6+
linkcheck:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: filiph/[email protected]
11+
with:
12+
arguments: https://www.scaleway.com/en/docs/

ai-data/generative-apis/api-cli/understanding-errors.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ content:
77
paragraph: This page explains how to understand errors with Generative APIs
88
tags: generative-apis ai-data understanding-data
99
dates:
10-
validation: 2024-09-02
10+
validation: 2024-10-31
1111
posted: 2024-09-02
1212
---
1313

@@ -32,6 +32,8 @@ Below are usual HTTP error codes:
3232
- 404 - **Route Not Found**: The requested resource could not be found. Check your request is being made to the correct endpoint.
3333
- 422 - **Model Not Found**: The `model` key is present in the request payload, but the corresponding model is not found.
3434
- 422 - **Missing Model**: The `model` key is missing from the request payload.
35+
- 429 - **Too Many Requests**: You are exceeding your current quota for the requested model, calculated in requests per minute. Find rate limits on [this page](/ai-data/generative-apis/reference-content/rate-limits/)
36+
- 429 - **Too Many Tokens**: You are exceeding your current quota for the requested model, calculated in tokens per minute. Find rate limits on [this page](/ai-data/generative-apis/reference-content/rate-limits/)
3537
- 500 - **API error**: An unexpected internal error has occurred within Scaleway's systems. If the issue persists, please [open a support ticket](https://console.scaleway.com/support/tickets/create).
3638

3739
For streaming responses via SSE, 5xx errors may occur after a 200 response has been returned.

ai-data/generative-apis/api-cli/using-chat-api.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Find required headers in [this page](/ai-data/generative-apis/api-cli/using-gene
5656

5757
| Param | Type | Description |
5858
| ------------- |-------------|-------------|
59-
| **messages*** | array of objects | A list of messages comprising the conversation so far. |
60-
| **model*** | string | The name of the model to query. |
59+
| **messages** | array of objects | A list of messages comprising the conversation so far. |
60+
| **model** | string | The name of the model to query. |
6161

6262
Our chat API is OpenAI compatible. Use OpenAI’s [API reference](https://platform.openai.com/docs/api-reference/chat/create) for more detailed information on the usage.
6363

@@ -67,6 +67,7 @@ Our chat API is OpenAI compatible. Use OpenAI’s [API reference](https://platfo
6767
- top_p
6868
- max_tokens
6969
- stream
70+
- stream_options
7071
- presence_penalty
7172
- [response_format](/ai-data/generative-apis/how-to/use-structured-outputs)
7273
- logprobs
@@ -87,6 +88,6 @@ If you have a use case requiring one of these unsupported parameters, please [co
8788

8889
## Going further
8990

90-
1. [Python code examples](/ai-data/generative-apis/how-to/query-text-models/#querying-text-models-via-api) to query text models using Scaleway's Chat API.
91+
1. [Python code examples](/ai-data/generative-apis/how-to/query-language-models/#querying-language-models-via-api) to query text models using Scaleway's Chat API
9192
2. [How to use structured outputs](/ai-data/generative-apis/how-to/use-structured-outputs) with the `response_format` parameter
9293
3. [How to use function calling](/ai-data/generative-apis/how-to/use-function-calling) with `tools` and `tool_choice`

ai-data/generative-apis/api-cli/using-embeddings-api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Find required headers in [this page](/ai-data/generative-apis/api-cli/using-gene
4040

4141
| Param | Type | Description |
4242
| ------------- |-------------|-------------|
43-
| **input*** | string or array | Input text to embed, encoded as a string or array of strings. It cannot be an empty string. |
44-
| **model*** | string | The name of the model to query. |
43+
| **input** | string or array | Input text to embed, encoded as a string or array of strings. It cannot be an empty string. |
44+
| **model** | string | The name of the model to query. |
4545

4646
Our embeddings API is OpenAI compatible. Use OpenAI’s [API reference](https://platform.openai.com/docs/api-reference/embeddings) for more detailed information on the usage.
4747

ai-data/generative-apis/api-cli/using-generative-apis.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dates:
1313

1414
## Access
1515

16-
- Access to this service is restricted while in beta. You can request access to the product by filling out a form on the Scaleway's [betas page](https://www.scaleway.com/en/betas/#generative-apis).
1716
- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) is needed.
1817

1918
## Authentication
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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](/ai-data/generative-apis/how-to/query-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+
22+
For more information on how to query language models, read [our dedicated documentation](/ai-data/generative-apis/how-to/query-language-models/).
23+
24+
Code models are also ideal AI assistants when **added to IDEs** (integrated development environments).
25+
26+
<Macro id="requirements" />
27+
28+
- A Scaleway account logged into the [console](https://console.scaleway.com)
29+
- [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
30+
- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) for API authentication
31+
- An IDE such as Visual Studio Code or JetBrains
32+
33+
## Install Continue in your IDE
34+
35+
[Continue](https://www.continue.dev/) is an [open-source code assistant](https://github.com/continuedev/continue) to connect AI models to your IDE.
36+
37+
To get Continue, simply hit `install` in your IDE's marketplace:
38+
- [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Continue.continue)
39+
- [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/22707-continue)
40+
41+
## Configure Scaleway as an API provider in Continue
42+
43+
Continue's `config.json` file will set models and providers allowed for chat, autocompletion etc.
44+
Here is an example configuration with Scaleway's OpenAI-compatible provider:
45+
46+
```json
47+
"models": [
48+
{
49+
"model": "qwen2.5-coder-32b-instruct",
50+
"title": "Qwen2.5-coder",
51+
"provider": "scaleway",
52+
"apiKey": "###SCW SECRET KEY###"
53+
}
54+
]
55+
```
56+
57+
<Message type="tip">
58+
The config.json file is typically stored as `~/.continue/config.json` on Linux/macOS systems, and `%USERPROFILE%\.continue\config.json` on Windows.
59+
</Message>
60+
61+
Read more about how to set up your `config.json` on the [official Continue documentation](https://docs.continue.dev/reference).
62+

ai-data/generative-apis/how-to/query-embedding-models.mdx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ meta:
55
content:
66
h1: How to query embedding models
77
paragraph: Learn how to interact with embedding models using Scaleway's Generative APIs service.
8-
tags: generative-apis ai-data embedding-models
8+
tags: generative-apis ai-data embedding-models embeddings-api
99
dates:
10-
validation: 2024-08-28
10+
validation: 2024-10-30
1111
posted: 2024-08-28
1212
---
1313

@@ -18,7 +18,6 @@ The embedding service is OpenAI compatible. Refer to OpenAI's [embedding documen
1818

1919
<Macro id="requirements" />
2020

21-
- Access to this service is restricted while in beta. You can request access to the product by filling out a form on Scaleway's [betas page](https://www.scaleway.com/en/betas/#generative-apis).
2221
- A Scaleway account logged into the [console](https://console.scaleway.com)
2322
- [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
2423
- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) for API authentication
@@ -51,22 +50,22 @@ client = OpenAI(
5150
)
5251
```
5352

54-
### Generating embeddings with sentence-t5-xxl
53+
### Generating embeddings with bge-multilingual-gemma2
5554

56-
You can now generate embeddings using the `sentence-t5-xxl` model, such as the following example:
55+
You can now generate embeddings using the `bge-multilingual-gemma2` model, such as the following example:
5756

5857
```python
59-
# Generate embeddings using the 'sentence-t5-xxl' model
58+
# Generate embeddings using the 'bge-multilingual-gemma2' model
6059
embedding_response = client.embeddings.create(
6160
input= "Artificial Intelligence is transforming the world.",
62-
model= "sentence-t5-xxl"
61+
model= "bge-multilingual-gemma2"
6362
)
6463

6564
# Output the embedding vector
6665
print(embedding_response.data[0].embedding)
6766
```
6867

69-
This code sends input text to the `sentence-t5-xxl` embedding model and returns a vector representation of the text. The `sentence-t5-xxl` model is specifically designed for generating high-quality sentence embeddings.
68+
This code sends input text to the `bge-multilingual-gemma2` embedding model and returns a vector representation of the text. The `bge-multilingual-gemma2` model is specifically designed for generating high-quality sentence embeddings.
7069

7170
### Model parameters and their effects
7271

ai-data/generative-apis/how-to/query-text-models.mdx renamed to ai-data/generative-apis/how-to/query-language-models.mdx

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,45 @@
11
---
22
meta:
3-
title: How to query text models
4-
description: Learn how to interact with powerful text models using Scaleway's Generative APIs service.
3+
title: How to query language models
4+
description: Learn how to interact with powerful language models using Scaleway's Generative APIs service.
55
content:
6-
h1: How to query text models
7-
paragraph: Learn how to interact with powerful text models using Scaleway's Generative APIs service.
8-
tags: generative-apis ai-data text-models
6+
h1: How to query language models
7+
paragraph: Learn how to interact with powerful language models using Scaleway's Generative APIs service.
8+
tags: generative-apis ai-data language-models chat-completions-api
99
dates:
10-
validation: 2024-08-28
10+
validation: 2024-10-30
1111
posted: 2024-08-28
1212
---
1313

14-
Scaleway's Generative APIs service allows users to interact with powerful text models hosted on the platform.
14+
Scaleway's Generative APIs service allows users to interact with powerful language models hosted on the platform.
1515

16-
There are several ways to interact with text models:
17-
- The Scaleway [console](https://console.scaleway.com) will soon provide a complete [playground](/ai-data/generative-apis/how-to/query-text-models/#accessing-the-playground), aiming to test models, adapt parameters, and observe how these changes affect the output in real-time.
18-
- Via the [Chat API](/ai-data/generative-apis/how-to/query-text-models/#querying-text-models-via-api)
16+
There are several ways to interact with language models:
17+
- 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.
18+
- Via the [Chat API](/ai-data/generative-apis/how-to/query-language-models/#querying-language-models-via-api)
1919

2020
<Macro id="requirements" />
2121

22-
- Access to this service is restricted while in beta. You can request access to the product by filling out a form on Scaleway's [betas page](https://www.scaleway.com/en/betas/#generative-apis).
2322
- A Scaleway account logged into the [console](https://console.scaleway.com)
2423
- [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
2524
- A valid [API key](/identity-and-access-management/iam/how-to/create-api-keys/) for API authentication
2625
- Python 3.7+ installed on your system
2726

2827
## Accessing the Playground
2928

30-
Scaleway's Playground is in development, stay tuned!
29+
Scaleway provides a web playground for instruct-based models hosted on Generative APIs.
3130

32-
## Querying text models via API
31+
1. Navigate to **Generative APIs** under the **AI** section of the [Scaleway console](https://console.scaleway.com/) side menu. The list of models you can query displays.
32+
2. Click the name of the chat model you want to try. Alternatively, click <Icon name="more" /> next to the chat model, and click **Try model** in the menu.
33+
34+
The web playground displays.
35+
36+
## Using the playground
37+
1. Enter a prompt at the bottom of the page, or use one of the suggested prompts in the conversation area.
38+
2. Edit the hyperparameters listed on the right column, for example the default temperature for more or less randomness on the outputs.
39+
3. Switch models at the top of the page, to observe the capabilities of chat models offered via Generative APIs.
40+
4. Click **View code** to get code snippets configured according to your settings in the playground.
41+
42+
## Querying language models via API
3343

3444
The [Chat API](/ai-data/generative-apis/api-cli/using-chat-api/) is an OpenAI-compatible REST API for generating and manipulating conversations.
3545

@@ -129,7 +139,7 @@ response = client.chat.completions.create(
129139
)
130140

131141
for chunk in response:
132-
if chunk.choices[0].delta.content:
142+
if chunk.choices and chunk.choices[0].delta.content:
133143
print(chunk.choices[0].delta.content, end="")
134144
```
135145

@@ -157,7 +167,8 @@ async def main():
157167
stream=True,
158168
)
159169
async for chunk in stream:
160-
print(chunk.choices[0].delta.content, end="")
170+
if chunk.choices and chunk.choices[0].delta.content:
171+
print(chunk.choices[0].delta.content, end="")
161172

162173
asyncio.run(main())
163174
```

0 commit comments

Comments
 (0)