You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/openai-chat.adoc
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -302,7 +302,7 @@ TIP: You can pass multiple audio files as well.
302
302
OpenAI models that offer input audio multimodal support include `gpt-4o-audio-preview`.
303
303
Refer to the link:https://platform.openai.com/docs/guides/audio[Audio] guide for more information.
304
304
305
-
The OpenAI link:https://platform.openai.com/docs/api-reference/chat/create#chat-create-messages[Assystant Message API] can contain a list of base64-encoded audio files with the message.
305
+
The OpenAI link:https://platform.openai.com/docs/api-reference/chat/create#chat-create-messages[Assistant Message API] can contain a list of base64-encoded audio files with the message.
306
306
Spring AI’s link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-model/src/main/java/org/springframework/ai/chat/messages/Message.java[Message] interface facilitates multimodal AI models by introducing the link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-model/src/main/java/org/springframework/ai/chat/messages/Media.java[Media] type.
307
307
This type encompasses data and details regarding media attachments in messages, utilizing Spring’s `org.springframework.util.MimeType` and a `org.springframework.core.io.Resource` for the raw media data.
308
308
Currently, OpenAI support only the following audio types: `audio/mp3` and `audio/wav`.
byte[] waveAudio = response.getResult().getOutput().getMedia().get(0).getDataAsByteArray(); // audio data
326
326
----
327
327
328
-
You have to specify an `audio` modality in the `OpenAiChatOptions` to generate audio output.
328
+
You have to specify an `audio` modality in the `OpenAiChatOptions` to generate audio output.
329
329
The `AudioParameters` class provides the voice and audio format for the audio output.
330
330
331
331
== Structured Outputs
332
332
333
-
OpenAI provides custom https://platform.openai.com/docs/guides/structured-outputs[Structured Outputs] APIs that ensure your model generates responses conforming strictly to your provided `JSON Schema`.
333
+
OpenAI provides custom https://platform.openai.com/docs/guides/structured-outputs[Structured Outputs] APIs that ensure your model generates responses conforming strictly to your provided `JSON Schema`.
334
334
In addition to the existing Spring AI model-agnostic xref::api/structured-output-converter.adoc[Structured Output Converter], these APIs offer enhanced control and precision.
335
335
336
336
NOTE: Currently, OpenAI supports a link:https://platform.openai.com/docs/guides/structured-outputs/supported-schemas[subset of the JSON Schema language] format.
Copy file name to clipboardExpand all lines: spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-server-boot-starter-docs.adoc
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -103,19 +103,19 @@ All properties are prefixed with `spring.ai.mcp.server`:
103
103
|`tool-response-mime-type` |(optional) response MIME type per tool name. For example `spring.ai.mcp.server.tool-response-mime-type.generateImage=image/png` will associate the `image/png` mime type with the `generateImage()` tool name |`-`
104
104
|`sse-message-endpoint` | Custom SSE Message endpoint path for web transport to be used by the client to send messages|`/mcp/message`
105
105
|`sse-endpoint` |Custom SSE endpoint path for web transport |`/sse`
106
-
|`base-url` | Optional URL prefix. For example `base-url=/api/v1` means that the client should access the sse endpont at `/api/v1` + `sse-endpoint` and the message endpoint is `/api/v1` + `sse-message-endpoint` | -
106
+
|`base-url` | Optional URL prefix. For example `base-url=/api/v1` means that the client should access the sse endpoint at `/api/v1` + `sse-endpoint` and the message endpoint is `/api/v1` + `sse-message-endpoint` | -
107
107
|`request-timeout` | Duration to wait for server responses before timing out requests. Applies to all requests made through the client, including tool calls, resource access, and prompt operations. | `20` seconds
108
108
|===
109
109
110
110
== Sync/Async Server Types
111
111
112
-
* **Synchronous Server** - The default server type implemented using `McpSyncServer`.
113
-
It is designed for straightforward request-response patterns in your applications.
114
-
To enable this server type, set `spring.ai.mcp.server.type=SYNC` in your configuration.
112
+
* **Synchronous Server** - The default server type implemented using `McpSyncServer`.
113
+
It is designed for straightforward request-response patterns in your applications.
114
+
To enable this server type, set `spring.ai.mcp.server.type=SYNC` in your configuration.
115
115
When activated, it automatically handles the configuration of synchronous tool specifications.
116
116
117
-
* **Asynchronous Server** - The asynchronous server implementation uses `McpAsyncServer` and is optimized for non-blocking operations.
118
-
To enable this server type, configure your application with `spring.ai.mcp.server.type=ASYNC`.
117
+
* **Asynchronous Server** - The asynchronous server implementation uses `McpAsyncServer` and is optimized for non-blocking operations.
118
+
To enable this server type, configure your application with `spring.ai.mcp.server.type=ASYNC`.
119
119
This server type automatically sets up asynchronous tool specifications with built-in Project Reactor support.
120
120
121
121
== Server Capabilities
@@ -250,7 +250,7 @@ Provides a standardized way for servers to expose completion capabilities to cli
250
250
@Bean
251
251
public List<McpServerFeatures.SyncCompletionSpecification> myCompletions() {
252
252
var completion = new McpServerFeatures.SyncCompletionSpecification(
253
-
"code-completion",
253
+
"code-completion",
254
254
"Provides code completion suggestions",
255
255
(exchange, request) -> {
256
256
// Implementation that returns completion suggestions
@@ -260,7 +260,7 @@ public List<McpServerFeatures.SyncCompletionSpecification> myCompletions() {
0 commit comments