Skip to content

Commit 1eed450

Browse files
committed
fix(responses): remove from vision
1 parent 3325935 commit 1eed450

File tree

2 files changed

+30
-63
lines changed

2 files changed

+30
-63
lines changed

macros/ai/chat-comp-vs-responses-api.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ macro: chat-comp-vs-responses-api
44

55
Both the [Chat Completions API](https://www.scaleway.com/en/developers/api/generative-apis/#path-chat-completions-create-a-chat-completion) and the [Responses API](https://www.scaleway.com/en/developers/api/generative-apis/#path-responses-beta-create-a-response) are OpenAI-compatible REST APIs that can be used for generating and manipulating conversations. The Chat Completions API is focused on generating conversational responses, while the Responses API is a more general REST API for chat, structured outputs, tool use, and multimodal inputs.
66

7-
The **Chat Completions** API was released in 2023, and is an industry standard for building AI applications, being specifically designed for handling multi-turn conversations. It is stateless, but allows users to manage conversation history by appending each new message to the ongoing conversation. Messages in the conversation can include text, images and audio extracts. The API also supports `function` tool-calling, where the developer defines a set of functions, which the model can decide whether to call when generating a response. If it decides to call one of these functions, it returns the function name and arguments, and the developer's own code must actually execute the function and feed the result back into the conversation for use by the model.
7+
The **Chat Completions** API was released in 2023, and is an industry standard for building AI applications, being specifically designed for handling multi-turn conversations. It is stateless, but allows users to manage conversation history by appending each new message to the ongoing conversation. Messages in the conversation can include text, images and audio extracts. The API supports `function` tool-calling, allowing developers to define functions that the model can choose to call. If it does so, it returns the function name and arguments, which the developer's code must execute and feed back into the conversation.
88

9-
The **Responses** API was released in 2025, and is designed to combine the simplicity of Chat Completions with the ability to do more agentic tasks and reasoning. It supports statefulness, being able to maintain context without needing to resend the entire conversation history. It offers tool-calling by built-in tools (e.g. web or file search) that the model is able to execute itself while generating a response, though currently only `function` tools are supported by Scaleway. Overall, **Scaleway's support for the Responses API is currently at beta stage and the support of the full features set will be incremental**. Most of the supported Generative API models can be used with Responses API, and note that for the **`gtp-oss-120b` model, the use of the Responses API is recommended** as it will allow you to access all of its features, especially tools calling.
9+
The **Responses** API was released in 2025, and is designed to combine the simplicity of Chat Completions with the ability to do more agentic tasks and reasoning. It supports statefulness, being able to maintain context without needing to resend the entire conversation history. It offers tool-calling by built-in tools (e.g. web or file search) that the model is able to execute itself while generating a response.
10+
11+
<Message type="note">
12+
Scaleway's support for the Responses API is currently at beta stage. Support of the full feature set will be incremental: currently statefulness and tools other than `function` calling are not supported.
13+
</Message>
14+
15+
Most supported Generative API models can be used with both Chat Completions and Responses API. For the **`gtp-oss-120b` model, use of the Responses API is recommended, as it will allow you to access all of its features, especially tool-calling.
1016

1117
For full details on the differences between these APIs, see the [official OpenAI documentation](https://platform.openai.com/docs/guides/migrate-to-responses).

pages/generative-apis/how-to/query-vision-models.mdx

Lines changed: 22 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ dates:
77
posted: 2024-10-30
88
---
99
import Requirements from '@macros/iam/requirements.mdx'
10-
import ChatCompVsResponsesApi from '@macros/ai/chat-comp-vs-responses-api.mdx'
11-
1210

1311
Scaleway's Generative APIs service allows users to interact with powerful vision models hosted on the platform.
1412

@@ -18,7 +16,7 @@ Scaleway's Generative APIs service allows users to interact with powerful vision
1816

1917
There are several ways to interact with vision models:
2018
- The Scaleway [console](https://console.scaleway.com) provides a complete [playground](/generative-apis/how-to/query-vision-models/#accessing-the-playground), aiming to test models, adapt parameters, and observe how these changes affect the output in real-time.
21-
- [Chat Completions API](https://www.scaleway.com/en/developers/api/generative-apis/#path-chat-completions-create-a-chat-completion) or the [Responses API](https://www.scaleway.com/en/developers/api/generative-apis/#path-responses-beta-create-a-response)
19+
- The [Chat Completions API](https://www.scaleway.com/en/developers/api/generative-apis/#path-chat-completions-create-a-chat-completion).
2220

2321
<Requirements />
2422

@@ -54,10 +52,6 @@ In the example that follows, we will use the OpenAI Python client.
5452
Unlike traditional language models, vision models will take a content array for the user role, structuring text and images as inputs.
5553
</Message>
5654

57-
### Chat Completions API or Responses API?
58-
59-
<ChatCompVsResponsesApi />
60-
6155
### Installing the OpenAI SDK
6256

6357
Install the OpenAI SDK using pip:
@@ -84,61 +78,28 @@ client = OpenAI(
8478

8579
You can now create a chat completion:
8680

87-
<Tabs id="vision-chat-completion">
88-
<TabsTab label="Chat Completions API">
89-
```python
90-
# Create a chat completion using the 'pixtral-12b-2409' model
91-
response = client.chat.completions.create(
92-
model="pixtral-12b-2409",
93-
messages=[
94-
{
95-
"role": "user",
96-
"content": [
97-
{"type": "text", "text": "What is this image?"},
98-
{"type": "image_url", "image_url": {"url": "https://picsum.photos/id/32/512/512"}},
99-
] # Vision models will take a content array with text and image_url objects.
100-
101-
}
102-
],
103-
temperature=0.7, # Adjusts creativity
104-
max_tokens=2048, # Limits the length of the output
105-
top_p=0.9 # Controls diversity through nucleus sampling. You usually only need to use temperature.
106-
)
107-
108-
# Print the generated response
109-
print(response.choices[0].message.content)
110-
```
111-
</TabsTab>
112-
<TabsTab label="Responses API (Beta)">
113-
```python
114-
from openai import OpenAI
115-
116-
# Create a chat completion using the 'mistral-small-3.2-24b-instruct-2506' model
117-
response = client.responses.create(
118-
model="mistral-small-3.2-24b-instruct-2506",
119-
input=[
120-
{
121-
"role": "user",
122-
"content": [
123-
{"type": "input_text", "text": "What is this image?"},
124-
{"type": "input_image",
125-
"image_url": "https://picsum.photos/id/32/512/512",
126-
"detail": "auto"}
127-
] # Vision models will take a content array with text and image_url objects.
128-
129-
}
130-
],
131-
temperature=0.7, # Adjusts creativity
132-
max_output_tokens=2048, # Limits the length of the output
133-
top_p=0.9 # Controls diversity through nucleus sampling. You usually only need to use temperature.
134-
)
81+
```python
82+
# Create a chat completion using the 'pixtral-12b-2409' model
83+
response = client.chat.completions.create(
84+
model="pixtral-12b-2409",
85+
messages=[
86+
{
87+
"role": "user",
88+
"content": [
89+
{"type": "text", "text": "What is this image?"},
90+
{"type": "image_url", "image_url": {"url": "https://picsum.photos/id/32/512/512"}},
91+
] # Vision models will take a content array with text and image_url objects.
92+
93+
}
94+
],
95+
temperature=0.7, # Adjusts creativity
96+
max_tokens=2048, # Limits the length of the output
97+
top_p=0.9 # Controls diversity through nucleus sampling. You usually only need to use temperature.
98+
)
13599

136-
# Print the generated response. Here, the last output message will contain the final content.
137-
# Previous outputs will contain reasoning content.
138-
print(response.output[-1].content[0].text)
139-
```
140-
</TabsTab>
141-
</Tabs>
100+
# Print the generated response
101+
print(response.choices[0].message.content)
102+
```
142103

143104
This code sends messages, prompts and images, to the vision model and returns an answer based on your input. The `temperature`, `max_tokens`, and `top_p` parameters control the response's creativity, length, and diversity, respectively.
144105

0 commit comments

Comments
 (0)