Skip to content

Commit 40eb72f

Browse files
authored
fix(ai): edited per beta tests feedbacks (#3741)
1 parent 1e19018 commit 40eb72f

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Creates a model response for the given chat conversation.
2323
curl --request POST \
2424
--url https://api.scaleway.ai/v1/chat/completions \
2525
--header 'Authorization: Bearer ${SCW_SECRET_KEY}' \
26-
--header 'Content-Type: application/json'
26+
--header 'Content-Type: application/json' \
2727
--data '{
2828
"model": "llama-3.1-8b-instruct",
2929
"messages": [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dates:
2020

2121
All requests to the Scaleway Generative APIs must include an `Authorization` HTTP header with your API key prefixed by `Bearer`.
2222

23-
We recommend exporting your secret key as an environment variable, which you can then pass directly in your curl request as follows. Remember to replace the example value with your own API secret key.
23+
We recommend exporting your secret key as an environment variable, which you can then pass directly in your curl request as follows. Remember to replace the example value with *your own API secret key*.
2424

2525
```
2626
export SCW_SECRET_KEY=720438f9-fcb9-4ebb-80a7-808ebf15314b

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ from openai import OpenAI
5454
# Initialize the client with your base URL and API key
5555
client = OpenAI(
5656
base_url="https://api.scaleway.ai/v1", # Scaleway's Generative APIs service URL
57-
api_key="<SCW_API_KEY>" # Your unique API key from Scaleway
57+
api_key="<SCW_SECRET_KEY>" # Your unique API secret key from Scaleway
5858
)
5959
```
6060

@@ -69,7 +69,7 @@ response = client.chat.completions.create(
6969
messages=[{"role": "user", "content": "Describe a futuristic city with advanced technology and green energy solutions."}],
7070
temperature=0.2, # Adjusts creativity
7171
max_tokens=100, # Limits the length of the output
72-
top_p=0.7 # Controls diversity through nucleus sampling
72+
top_p=0.7 # Controls diversity through nucleus sampling. You usually only need to use temperature.
7373
)
7474

7575
# Print the generated response

ai-data/generative-apis/quickstart.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ pip install openai
5555
from openai import OpenAI
5656

5757
client = OpenAI(
58-
base_url="https://api.scaleway.ai/v1",
59-
api_key="<SCW_API_KEY>"
58+
base_url="https://api.scaleway.ai/v1", # # Scaleway's Generative APIs service URL
59+
api_key="<SCW_SECRET_KEY>" # Your unique API secret key from Scaleway
6060
)
6161
```
6262

63-
Make sure that you replace `<SCW_API_KEY>` with the API key obtained from your Scaleway account.
63+
Make sure that you replace `<SCW_SECRET_KEY>` with the API key obtained from your Scaleway account.
6464

6565
<Message type="tip">
6666
It is recommended to store your API keys securely using environment variables or [secret management tools](/identity-and-access-management/secret-manager/) to prevent unauthorized access.

0 commit comments

Comments
 (0)