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/chatmodel.adoc
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -19,11 +19,11 @@ This section provides a guide to the Spring AI Chat Model API interface and asso
19
19
20
20
=== ChatModel
21
21
22
-
Here is the link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-client-chat/src/main/java/org/springframework/ai/chat//model/ChatModel.java[ChatModel] interface definition:
22
+
Here is the link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-model/src/main/java/org/springframework/ai/chat/model/ChatModel.java[ChatModel] interface definition:
23
23
24
24
[source,java]
25
25
----
26
-
public interface ChatModel extends Model<Prompt, ChatResponse> {
26
+
public interface ChatModel extends Model<Prompt, ChatResponse>, StreamingChatModel {
27
27
28
28
default String call(String message) {...}
29
29
@@ -82,7 +82,8 @@ The `Message` interface encapsulates a `Prompt` textual content, a collection of
82
82
83
83
The interface is defined as follows:
84
84
85
-
```java
85
+
[source,java]
86
+
----
86
87
public interface Content {
87
88
88
89
String getText();
@@ -94,17 +95,18 @@ public interface Message extends Content {
94
95
95
96
MessageType getMessageType();
96
97
}
97
-
```
98
+
----
98
99
99
100
The multimodal message types implement also the `MediaContent` interface providing a list of `Media` content objects.
100
101
101
-
```java
102
+
[source,java]
103
+
----
102
104
public interface MediaContent extends Content {
103
105
104
106
Collection<Media> getMedia();
105
107
106
108
}
107
-
```
109
+
----
108
110
109
111
The `Message` interface has various implementations that correspond to the categories of messages that an AI model can process:
0 commit comments