Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/generative-apis/how-to/query-embedding-models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ from openai import OpenAI
# Initialize the client with your base URL and API key
client = OpenAI(
base_url="https://api.scaleway.ai/v1", # Scaleway's Generative APIs service URL
api_key="<SCW_API_KEY>" # Your unique API key from Scaleway
api_key="<SCW_SECRET_KEY>" # Your unique API key from Scaleway
)
```

Expand Down
8 changes: 4 additions & 4 deletions pages/generative-apis/how-to/query-language-models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ By default, the outputs are returned to the client only after the generation pro

client = OpenAI(
base_url="https://api.scaleway.ai/v1", # Scaleway's Generative APIs service URL
api_key="<SCW_API_KEY>" # Your Scaleway API secret key
api_key="<SCW_SECRET_KEY>" # Your Scaleway API secret key
)
response = client.chat.completions.create(
model="llama-3.1-8b-instruct",
Expand All @@ -212,7 +212,7 @@ By default, the outputs are returned to the client only after the generation pro

client = OpenAI(
base_url="https://api.scaleway.ai/v1", # Scaleway's Generative APIs service URL
api_key="<SCW_API_KEY>" # Your Scaleway API secret key
api_key="<SCW_SECRET_KEY>" # Your Scaleway API secret key
)

response = client.responses.create(
Expand Down Expand Up @@ -243,7 +243,7 @@ The service also supports asynchronous mode for any chat completion.

client = AsyncOpenAI(
base_url="https://api.scaleway.ai/v1", # Scaleway's Generative APIs service URL
api_key="<SCW_API_KEY>" # Your unique API key from Scaleway
api_key="<SCW_SECRET_KEY>" # Your unique API key from Scaleway
)

async def main():
Expand All @@ -269,7 +269,7 @@ The service also supports asynchronous mode for any chat completion.

client = AsyncOpenAI(
base_url="https://api.scaleway.ai/v1", # Scaleway's Generative APIs service URL
api_key="<SCW_API_KEY>" # Your unique API key from Scaleway
api_key="<SCW_SECRET_KEY>" # Your unique API key from Scaleway
)

async def main():
Expand Down
4 changes: 2 additions & 2 deletions pages/generative-apis/how-to/query-vision-models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ from openai import OpenAI

client = OpenAI(
base_url="https://api.scaleway.ai/v1", # Scaleway's Generative APIs service URL
api_key="<SCW_API_KEY>" # Your unique API key from Scaleway
api_key="<SCW_SECRET_KEY>" # Your unique API key from Scaleway
)
response = client.chat.completions.create(
model="mistral-small-3.2-24b-instruct-2506",
Expand Down Expand Up @@ -229,7 +229,7 @@ from openai import AsyncOpenAI

client = AsyncOpenAI(
base_url="https://api.scaleway.ai/v1", # Scaleway's Generative APIs service URL
api_key="<SCW_API_KEY>" # Your unique API key from Scaleway
api_key="<SCW_SECRET_KEY>" # Your unique API key from Scaleway
)

async def main():
Expand Down
2 changes: 1 addition & 1 deletion pages/generative-apis/how-to/use-structured-outputs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ We are using the base code below to send our LLM a voice note transcript to stru
MODEL = "llama-3.1-8b-instruct" ## or "gpt-oss-120b" for the Responses API

# Set your API key
API_KEY = "<SCW_API_KEY>"
API_KEY = "<SCW_SECRET_KEY>"

client = OpenAI(
base_url="https://api.scaleway.ai/v1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ https://<Deployment UUID>.ifr.fr-par.scaleway.com/v1/embeddings

```
curl https://<Deployment UUID>.ifr.fr-par.scaleway.com/v1/embeddings \
-H "Authorization: Bearer $SCW_API_KEY" \
-H "Authorization: Bearer $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "Embeddings can represent text in a numerical format.",
Expand Down Expand Up @@ -145,7 +145,7 @@ https://<Deployment UUID>.ifr.fr-par.scaleway.com/v1/models

```
curl https://<Deployment UUID>.ifr.fr-par.scaleway.com/v1/models \
-H "Authorization: Bearer $SCW_API_KEY" \
-H "Authorization: Bearer $SCW_SECRET_KEY" \
-H "Content-Type: application/json"
```

Expand Down
6 changes: 3 additions & 3 deletions tutorials/how-to-implement-rag/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Create a .env file and add the following variables. These will store your API ke

# Scaleway API credentials
SCW_ACCESS_KEY=your_scaleway_access_key
SCW_API_KEY=your_scaleway_secret_ke
SCW_SECRET_KEY=your_scaleway_secret_key
SCW_REGION=your_scaleway_region

# Scaleway managed database (PostgreSQL) credentials
Expand Down Expand Up @@ -143,7 +143,7 @@ We will use the [OpenAIEmbeddings](https://api.python.langchain.com/en/latest/em
# rag.py

embeddings = OpenAIEmbeddings(
openai_api_key=os.getenv("SCW_API_KEY"),
openai_api_key=os.getenv("SCW_SECRET_KEY"),
openai_api_base=os.getenv("SCW_INFERENCE_EMBEDDINGS_ENDPOINT"),
model="sentence-transformers/sentence-t5-xxl",
tiktoken_enabled=False,
Expand Down Expand Up @@ -371,4 +371,4 @@ Furthermore, you can continually enhance your RAG system by implementing mechani

By integrating Scaleway Object Storage, Managed Database for PostgreSQL with pgvector, and LangChain’s embedding tools, you have the foundation to build a powerful RAG system that scales with your data while offering robust information retrieval capabilities. This approach equips you with the tools necessary to handle complex queries and deliver accurate, relevant results efficiently.

With ongoing refinement and adaptation, your RAG system can evolve to meet the changing needs of your users, ensuring that it remains a valuable asset in your AI toolkit.
With ongoing refinement and adaptation, your RAG system can evolve to meet the changing needs of your users, ensuring that it remains a valuable asset in your AI toolkit.
Loading