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
Deprecate redundant field in ModelObservationContext
Each ModelObservationContext takes both a request object (e.g. Prompt) and an options object (e.g. ChatOptions). However, the options are already included in the request object. This PR deprecates the additional field, which will be removed in a subsequent release.
The reason why the extra field was there in the first place was due to the model implementations not handling request options correctly, requiring a dedicated setter. We started fixing the model implementations now, so we are deprecating te extra field, and we'll remove it in the next release, once we have completed the implementation of a fix for all model implementations.
Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
Copy file name to clipboardExpand all lines: spring-ai-core/src/main/java/org/springframework/ai/embedding/observation/EmbeddingModelObservationContext.java
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,10 @@ public static Builder builder() {
49
49
returnnewBuilder();
50
50
}
51
51
52
+
/**
53
+
* @deprecated Use {@link #getRequest().getOptions()} instead.
54
+
*/
55
+
@Deprecated(forRemoval = true)
52
56
publicEmbeddingOptionsgetRequestOptions() {
53
57
returnthis.requestOptions;
54
58
}
@@ -74,6 +78,11 @@ public Builder provider(String provider) {
74
78
returnthis;
75
79
}
76
80
81
+
/**
82
+
* @deprecated EmbeddingOptions are passed in the EmbeddingRequest object and
0 commit comments