Skip to content

Commit dd2c8b0

Browse files
authored
Merge branch 'main' into MTA-3940
2 parents c30cf42 + 5693e0c commit dd2c8b0

File tree

2,205 files changed

+65309
-40075
lines changed

Some content is hidden

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

2,205 files changed

+65309
-40075
lines changed

.devcontainer/devcontainer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"customizations": {
3+
"vscode": {
4+
"extensions": ["unifiedjs.vscode-mdx"]
5+
}
6+
}
7+
}

.devcontainer/info.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Devcontainer, the Gihub Codespaces configuration file
2+
3+
This configuration is intended for [Github Codespaces](https://docs.github.com/en/codespaces) users.
4+
5+
The `devcontainer.json` file allows to specify a configuration that can be used to create a Codespace.
6+
7+
Refer to the official [Codespaces devcontainers documentation](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration) for more information.
8+
9+
## Elements
10+
11+
The code below forces the installation of the MDX extension for VSCode inside a Codespace.
12+
13+
```json
14+
{
15+
"customizations": {
16+
"vscode": {
17+
"extensions": ["unifiedjs.vscode-mdx"]
18+
}
19+
}
20+
}
21+
```
22+
23+
**Note:** The identifier of the extension (e.g. `unifiedjs.vscode-mdx`) can be found on the VSCode extension page, under "More info".

.github/CODEOWNERS

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
#This is a list of people who will be tagged whenever a PR is opened to edit one of the files listed below.
22

33
# Samy
4-
storage/object/ @SamyOubouaziz
5-
serverless/containers/ @SamyOubouaziz
4+
storage/object/ @SamyOubouaziz
65
serverless/functions/ @SamyOubouaziz
7-
console/ @farhakennar @SamyOubouaziz @ldecarvalho-doc
6+
serverless/containers/ @SamyOubouaziz
7+
serverless/jobs/ @SamyOubouaziz
8+
serverless/sql-databases/ @SamyOubouaziz
9+
console/account/ @SamyOubouaziz @pshambulingappa
10+
developer-tools/ @SamyOubouaziz
811

912
# Rowena
1013
network/vpc/ @RoRoJ
@@ -13,31 +16,26 @@ network/load-balancer/ @RoRoJ
1316
serverless/messaging/ @RoRoJ
1417

1518
# Benedikt
16-
compute/gpu/ @bene2k1
17-
compute/instances/ @bene2k1
18-
bare-metal/dedibox/ @bene2k1
19-
bare-metal/elastic-metal/ @bene2k1
19+
compute/ @bene2k1
20+
bare-metal/ @bene2k1
2021
containers/kubernetes/ @bene2k1
21-
storage/block/ @bene2k1 @ldecarvalho-doc
2222
managed-services/webhosting/ @bene2k1
2323
dedibox/ @bene2k1
2424
dedibox-network/ @bene2k1
2525
dedibox-console/ @bene2k1
26+
ai-data/ @bene2k1
2627

2728
# Néda
28-
managed-services/transactional-email/ @nerda-codes
2929
observability/ @nerda-codes
3030
network/domains-and-dns/ @nerda-codes
3131
identity-and-access-management/secret-manager/ @nerda-codes
32+
storage/block/ @nerda-codes
3233

3334
# Luiza
3435
identity-and-access-management/iam/ @ldecarvalho-doc
35-
managed-databases/document-database/ @ldecarvalho-doc
3636
managed-databases/postgresql-and-mysql/ @ldecarvalho-doc
3737
managed-databases/redis/ @ldecarvalho-doc
3838
containers/container-registry/ @ldecarvalho-doc
3939
labs/ @ldecarvalho-doc
40-
41-
# Farha
42-
bare-metal/apple-silicon/ @farhakennar
43-
managed-services/iot-hub/ @farhakennar
40+
console/billing/ @ldecarvalho-doc @pshambulingappa
41+
managed-services/transactional-email/ @ldecarvalho-doc

.github/ISSUE_TEMPLATE/doc_bug.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body:
77
attributes:
88
value: |
99
* Please check that there is not an existing open [issue](https://github.com/scaleway/docs-content/issues) before you create a new one.
10-
* Read the [writing guidelines](https://github.com/scaleway/docs-content/blob/main/docs/CONTRIBUTING.md#writing-guidelines) before you continue.
10+
* Read the [writing guidelines](https://www.scaleway.com/en/docs/guidelines/) before you continue.
1111
- type: input
1212
attributes:
1313
label: What content on scaleway.com/en/docs is affected?
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: 📖 Review Documentation Bot
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dryRun:
7+
description: 'Run the bot without sending notifications'
8+
required: false
9+
default: 'false'
10+
11+
schedule:
12+
- cron: '0 8 * * 1'
13+
14+
env:
15+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
16+
DRY_RUN: false
17+
18+
jobs:
19+
review-docs:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v2
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: '3.x'
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install -r requirements.txt
35+
36+
- name: Run Documentation Review Bot in dry run mode
37+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.dryRun == 'true'
38+
env:
39+
DRY_RUN: true
40+
run: |
41+
python bin/check-review-dates.py
42+
43+
- name: Run Documentation Review Bot in normal mode
44+
if: github.event_name != 'workflow_dispatch' || github.event.inputs.dryRun != 'true'
45+
run: |
46+
python bin/check-review-dates.py
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Check Markdown links
2+
3+
on: push
4+
5+
jobs:
6+
markdown-link-check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@master
10+
- uses: gaurav-nelson/github-action-markdown-link-check@v1
11+
with:
12+
base-branch: 'main'
13+
use-quiet-mode: 'yes'
14+
check-modified-files-only: 'yes'
15+
file-extension: '.mdx'
16+
config-file: '.link_checker_config.json'

.link_checker_config.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "^http://scaleway.com"
5+
}
6+
],
7+
"replacementPatterns": [
8+
{
9+
"pattern": "^/.attachments",
10+
"replacement": "https://scaleway.com/en/docs/.attachments"
11+
},
12+
{
13+
"pattern": "^/",
14+
"replacement": "https://scaleway.com/en/docs/"
15+
},
16+
{
17+
"pattern": "%20",
18+
"replacement": "-",
19+
"global": true
20+
}
21+
],
22+
"httpHeaders": [
23+
{
24+
"urls": ["https://scaleway.com/en/docs"]
25+
}
26+
],
27+
"timeout": "20s",
28+
"retryOn429": true,
29+
"retryCount": 5,
30+
"fallbackRetryDelay": "30s",
31+
"aliveStatusCodes": [200, 206, 401, 403, 0]
32+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
meta:
3+
title: Generative APIs - API/CLI
4+
description: Generative APIs API/CLI
5+
content:
6+
h1: Generative APIs - API/CLI
7+
paragraph: Generative APIs API/CLI
8+
---
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
meta:
3+
title: Understanding errors
4+
description: This page explains how to understand errors with Generative APIs
5+
content:
6+
h1: Understanding errors
7+
paragraph: This page explains how to understand errors with Generative APIs
8+
tags: generative-apis ai-data understanding-data
9+
dates:
10+
validation: 2024-10-31
11+
posted: 2024-09-02
12+
---
13+
14+
Scaleway uses conventional HTTP response codes to indicate the success or failure of an API request.
15+
In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error caused by the information provided, and codes in the 5xx range show an error from Scaleway servers.
16+
17+
If the response code is not within the 2xx range, the response will contain an error object structured as follows:
18+
19+
```
20+
{
21+
"error": string,
22+
"status": number,
23+
"message": string
24+
}
25+
```
26+
27+
Below are usual HTTP error codes:
28+
29+
- 400 - **Bad Request**: The format or content of your payload is incorrect. The body may be too large, or fail to parse, or the content-type is mismatched.
30+
- 401 - **Unauthorized**: The `authorization` header is missing. Find required headers in [this page](/ai-data/generative-apis/api-cli/using-generative-apis/)
31+
- 403 - **Forbidden**: Your API key does not exist or does not have the necessary permissions to access the requested resource. Find required permission sets in [this page](/ai-data/generative-apis/api-cli/using-generative-apis/)
32+
- 404 - **Route Not Found**: The requested resource could not be found. Check your request is being made to the correct endpoint.
33+
- 422 - **Model Not Found**: The `model` key is present in the request payload, but the corresponding model is not found.
34+
- 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/)
37+
- 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).
38+
39+
For streaming responses via SSE, 5xx errors may occur after a 200 response has been returned.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
meta:
3+
title: Using Chat API
4+
description: This page explains how to use the Chat API to query models
5+
content:
6+
h1: Using Chat API
7+
paragraph: This page explains how to use the Chat API to query models
8+
tags: generative-apis ai-data chat-api
9+
dates:
10+
validation: 2024-09-03
11+
posted: 2024-09-03
12+
---
13+
14+
Scaleway Generative APIs are designed as a drop-in replacement for the OpenAI APIs. If you have an LLM-driven application that uses one of OpenAI's client libraries, you can easily configure it to point to Scaleway Chat API, and get your existing applications running using open-weight instruct models hosted at Scaleway.
15+
16+
## Create chat completion
17+
18+
Creates a model response for the given chat conversation.
19+
20+
**Request sample:**
21+
22+
```
23+
curl --request POST \
24+
--url https://api.scaleway.ai/v1/chat/completions \
25+
--header 'Authorization: Bearer ${SCW_SECRET_KEY}' \
26+
--header 'Content-Type: application/json' \
27+
--data '{
28+
"model": "llama-3.1-8b-instruct",
29+
"messages": [
30+
{
31+
"role": "system",
32+
"content": "<string>"
33+
},
34+
{
35+
"role": "user",
36+
"content": "<string>"
37+
}
38+
],
39+
"max_tokens": integer,
40+
"temperature": float,
41+
"top_p": float,
42+
"presence_penalty": float,
43+
"stop": "<string>",
44+
"stream": boolean,
45+
}'
46+
```
47+
48+
49+
## Headers
50+
51+
Find required headers in [this page](/ai-data/generative-apis/api-cli/using-generative-apis/).
52+
53+
## Body
54+
55+
### Required parameters
56+
57+
| Param | Type | Description |
58+
| ------------- |-------------|-------------|
59+
| **messages*** | array of objects | A list of messages comprising the conversation so far. |
60+
| **model*** | string | The name of the model to query. |
61+
62+
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.
63+
64+
### Supported parameters
65+
66+
- temperature
67+
- top_p
68+
- max_tokens
69+
- stream
70+
- presence_penalty
71+
- [response_format](/ai-data/generative-apis/how-to/use-structured-outputs)
72+
- logprobs
73+
- stop
74+
- seed
75+
- [tools](/ai-data/generative-apis/how-to/use-function-calling)
76+
- [tool_choice](/ai-data/generative-apis/how-to/use-function-calling)
77+
78+
### Unsupported parameters
79+
80+
- frequency_penalty
81+
- n
82+
- top_logprobs
83+
- logit_bias
84+
- user
85+
86+
If you have a use case requiring one of these unsupported parameters, please [contact us via Slack](https://slack.scaleway.com/) on #ai channel.
87+
88+
## Going further
89+
90+
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.
91+
2. [How to use structured outputs](/ai-data/generative-apis/how-to/use-structured-outputs) with the `response_format` parameter
92+
3. [How to use function calling](/ai-data/generative-apis/how-to/use-function-calling) with `tools` and `tool_choice`

0 commit comments

Comments
 (0)