Skip to content

Commit 84737ec

Browse files
committed
update some javadoc warnings
1 parent f989dfe commit 84737ec

File tree

13 files changed

+77
-17
lines changed

13 files changed

+77
-17
lines changed

models/spring-ai-moonshot/src/main/java/org/springframework/ai/moonshot/api/MoonshotApi.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,12 @@ public static Object function(String functionName) {
253253
/**
254254
* Message comprising the conversation.
255255
*
256-
* @param content The contents of the message.
257-
* @param role The role of the messages author. Could be one of the {@link Role}
256+
* @param rawContent The raw contents of the message.
257+
* @param role The role of the message's author. Could be one of the {@link Role}
258258
* types.
259+
* @param name The name of the message's author.
260+
* @param toolCallId The ID of the tool call associated with the message.
261+
* @param toolCalls The list of tool calls associated with the message.
259262
*/
260263
@JsonInclude(Include.NON_NULL)
261264
public record ChatCompletionMessage(

spring-ai-core/src/main/java/org/springframework/ai/chat/client/AdvisedRequest.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,19 @@
3030
* ChatClient's call method
3131
*
3232
* @author Christian Tzolov
33-
* @since 1.0.0 M1
34-
*
33+
* @since 1.0.0
34+
* @param chatModel the chat model used
35+
* @param userText the text provided by the user
36+
* @param systemText the text provided by the system
37+
* @param chatOptions the options for the chat
38+
* @param media the list of media items
39+
* @param functionNames the list of function names
40+
* @param functionCallbacks the list of function callbacks
41+
* @param messages the list of messages
42+
* @param userParams the map of user parameters
43+
* @param systemParams the map of system parameters
44+
* @param advisors the list of request response advisors
45+
* @param advisorParams the map of advisor parameters
3546
*/
3647
public record AdvisedRequest(ChatModel chatModel, String userText, String systemText, ChatOptions chatOptions,
3748
List<Media> media, List<String> functionNames, List<FunctionCallback> functionCallbacks, List<Message> messages,

spring-ai-core/src/main/java/org/springframework/ai/chat/client/DefaultChatClientBuilder.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,15 @@
3232
import org.springframework.util.Assert;
3333

3434
/**
35+
* DefaultChatClientBuilder is a builder class for creating a ChatClient.
36+
*
37+
* It provides methods to set default values for various properties of the ChatClient.
38+
*
3539
* @author Mark Pollack
3640
* @author Christian Tzolov
3741
* @author Josh Long
3842
* @author Arjen Poutsma
3943
* @since 1.0.0
40-
*
4144
*/
4245
public class DefaultChatClientBuilder implements Builder {
4346

spring-ai-core/src/main/java/org/springframework/ai/chat/client/ResponseEntity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
*
2323
* @param <R> the entire response type.
2424
* @param <E> the converted entity type.
25+
* @param response the entire response object.
26+
* @param entity the converted entity object.
2527
* @author Christian Tzolov
2628
* @since 1.0.0
2729
*/

spring-ai-core/src/main/java/org/springframework/ai/chat/client/advisor/AbstractChatMemoryAdvisor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
/**
2525
* Abstract class that serves as a base for chat memory advisors.
2626
*
27+
* @param <T> the type of the chat memory.
2728
* @author Christian Tzolov
2829
* @since 1.0.0 M1
2930
*/

spring-ai-core/src/main/java/org/springframework/ai/chat/prompt/Prompt.java

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@
2828
import org.springframework.ai.model.ModelRequest;
2929

3030
/**
31+
* The Prompt class represents a prompt used in AI model requests. A prompt consists of
32+
* one or more messages and additional chat options.
33+
*
3134
* @author Mark Pollack
3235
* @author luocongqiu
3336
*/
3437
public class Prompt implements ModelRequest<List<Message>> {
3538

3639
private final List<Message> messages;
3740

38-
private ChatOptions modelOptions;
41+
private ChatOptions chatOptions;
3942

4043
public Prompt(String contents) {
4144
this(new UserMessage(contents));
@@ -49,17 +52,17 @@ public Prompt(List<Message> messages) {
4952
this.messages = messages;
5053
}
5154

52-
public Prompt(String contents, ChatOptions modelOptions) {
53-
this(new UserMessage(contents), modelOptions);
55+
public Prompt(String contents, ChatOptions chatOptions) {
56+
this(new UserMessage(contents), chatOptions);
5457
}
5558

56-
public Prompt(Message message, ChatOptions modelOptions) {
57-
this(Collections.singletonList(message), modelOptions);
59+
public Prompt(Message message, ChatOptions chatOptions) {
60+
this(Collections.singletonList(message), chatOptions);
5861
}
5962

60-
public Prompt(List<Message> messages, ChatOptions modelOptions) {
63+
public Prompt(List<Message> messages, ChatOptions chatOptions) {
6164
this.messages = messages;
62-
this.modelOptions = modelOptions;
65+
this.chatOptions = chatOptions;
6366
}
6467

6568
public String getContents() {
@@ -72,7 +75,7 @@ public String getContents() {
7275

7376
@Override
7477
public ChatOptions getOptions() {
75-
return this.modelOptions;
78+
return this.chatOptions;
7679
}
7780

7881
@Override
@@ -82,7 +85,7 @@ public List<Message> getInstructions() {
8285

8386
@Override
8487
public String toString() {
85-
return "Prompt{" + "messages=" + this.messages + ", modelOptions=" + this.modelOptions + '}';
88+
return "Prompt{" + "messages=" + this.messages + ", modelOptions=" + this.chatOptions + '}';
8689
}
8790

8891
@Override
@@ -91,16 +94,16 @@ public boolean equals(Object o) {
9194
return true;
9295
if (!(o instanceof Prompt prompt))
9396
return false;
94-
return Objects.equals(this.messages, prompt.messages) && Objects.equals(this.modelOptions, prompt.modelOptions);
97+
return Objects.equals(this.messages, prompt.messages) && Objects.equals(this.chatOptions, prompt.chatOptions);
9598
}
9699

97100
@Override
98101
public int hashCode() {
99-
return Objects.hash(this.messages, this.modelOptions);
102+
return Objects.hash(this.messages, this.chatOptions);
100103
}
101104

102105
public Prompt copy() {
103-
return new Prompt(instructionsCopy(), this.modelOptions);
106+
return new Prompt(instructionsCopy(), this.chatOptions);
104107
}
105108

106109
private List<Message> instructionsCopy() {

spring-ai-core/src/main/java/org/springframework/ai/vectorstore/filter/Filter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,17 @@ public interface Operand {
7575
/**
7676
* String identifier representing an expression key. (e.g. the country in the country
7777
* == "NL" expression).
78+
*
79+
* @param key expression key
7880
*/
7981
public record Key(String key) implements Operand {
8082
}
8183

8284
/**
8385
* Represents expression value constant or constant array. Support Numeric, Boolean
8486
* and String data types.
87+
*
88+
* @param value value constant or constant array
8589
*/
8690
public record Value(Object value) implements Operand {
8791
}

spring-ai-core/src/main/java/org/springframework/ai/vectorstore/filter/converter/AbstractFilterExpressionConverter.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
import org.springframework.ai.vectorstore.filter.Filter.Operand;
2727

2828
/**
29+
* AbstractFilterExpressionConverter is an abstract class that implements the
30+
* FilterExpressionConverter interface. It provides default implementations for converting
31+
* a Filter.Expression into a string representation. All specific filter expression
32+
* converters should extend this abstract class and implement the remaining abstract
33+
* methods. Note: The class cannot be directly instantiated as it is abstract.
34+
*
2935
* @author Christian Tzolov
3036
*/
3137
public abstract class AbstractFilterExpressionConverter implements FilterExpressionConverter {

vector-stores/spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/ElasticsearchAiSearchFilterExpressionConverter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
import java.util.regex.Pattern;
2929

3030
/**
31+
* ElasticsearchAiSearchFilterExpressionConverter is a class that converts
32+
* Filter.Expression objects into Elasticsearch query string representation. It extends
33+
* the AbstractFilter ExpressionConverter class.
34+
*
3135
* @author Jemin Huh
3236
* @since 1.0.0
3337
*/

vector-stores/spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/ElasticsearchVectorStore.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@
4646
import static org.springframework.ai.vectorstore.SimilarityFunction.l2_norm;
4747

4848
/**
49+
* The ElasticsearchVectorStore class implements the VectorStore interface and provides
50+
* functionality for managing and querying documents in Elasticsearch. It uses an
51+
* embedding model to generate vector representations of the documents and performs
52+
* similarity searches based on these vectors.
53+
*
54+
* The ElasticsearchVectorStore class requires a RestClient and an EmbeddingModel to be
55+
* instantiated. It also supports optional initialization of the Elasticsearch schema.
56+
*
4957
* @author Jemin Huh
5058
* @author Wei Jiang
5159
* @author Laura Trotta

0 commit comments

Comments
 (0)