Skip to content

Commit dc86957

Browse files
mkhecktzolov
authored andcommitted
Documentation fixes, clean and polish
1 parent 330f8b3 commit dc86957

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chatclient.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public interface StreamingChatClient extends StreamingModelClient<Prompt, ChatRe
5353

5454
The `stream` method takes a `Prompt` request similar to `ChatClient` but it streams the responses using the reactive Flux API.
5555

56+
In real-world applications, it is more common to use the `generate` method that takes a `Prompt` instance and returns an `AiResponse`.
57+
5658
=== Prompt
5759

5860
The https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/prompt/Prompt.java[Prompt] is a `ModelRequest` that encapsulates a list of https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/chat/messages/Message.java[Message] objects and optional model request options.
@@ -96,6 +98,7 @@ The `Message` interface has various implementations that correspond to the categ
9698
Some models, like OpenAI's chat completion endpoint, distinguish between message categories based on conversational roles, effectively mapped by the `MessageType`.
9799

98100
For instance, OpenAI recognizes message categories for distinct conversational roles such as `system`,`user`, `function` or `assistant`.
101+
99102
While the term `MessageType` might imply a specific message format, in this context it effectively designates the role a message plays in the dialogue.
100103

101104
For AI models that do not use specific roles, the `UserMessage` implementation acts as a standard category, typically representing user-generated inquiries or instructions.
@@ -106,6 +109,7 @@ To understand the practical application and the relationship between `Prompt` an
106109
Represents the options that can be passed to the AI model. The `ChatOptions` class is a subclass of `ModelOptions` and is used to define few portable options that can be passed to the AI model.
107110
The `ChatOptions` class is defined as follows:
108111

112+
109113
[source,java]
110114
----
111115
public interface ChatOptions extends ModelOptions {

0 commit comments

Comments
 (0)