-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix incorrect ollama autoconfiguration changes #3645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix incorrect ollama autoconfiguration changes #3645
Conversation
a0c55ae
to
5ee2ed7
Compare
5ee2ed7
to
0c5d9be
Compare
0c5d9be
to
e26341f
Compare
e26341f
to
0d9a289
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the name of the method openAiEmbeddingModel
in OllamaEmbeddingModelObservationIT
also incorrect?
Lines 105 to 108 in 089c3eb
public OllamaEmbeddingModel openAiEmbeddingModel(OllamaApi ollamaApi, | |
TestObservationRegistry observationRegistry) { | |
return OllamaEmbeddingModel.builder().ollamaApi(ollamaApi).observationRegistry(observationRegistry).build(); | |
} |
@sunyuhan1998 Good catch. I'll fix that part as well |
Signed-off-by: jonghoonpark <[email protected]>
0d9a289
to
fa5e287
Compare
Actually, I also found another similar issue, but it's not closely related to the content of this PR : Lines 108 to 112 in 089c3eb
|
@sunyuhan1998 👍 |
fixing that with this pr #3652 |
Recently, with the merge of #1852, file from the old AutoConfiguration path were unintentionally restored.
Currently, AutoConfiguration classes are located under
/auto-configurations/**
.However,
OllamaAutoConfiguration
is located in/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/ollama/OllamaAutoConfiguration.java
.To address this, the file has been removed, and the originally intended changes have been added to the
OllamaApiAutoConfiguration
andOllamaChatAutoConfiguration
files.I have confirmed that the following tests pass successfully:
@markpollack @apappascs
Additionally, I noticed an incorrect method name in the
OllamaEmbeddingModelObservationIT
test and made the necessary correction:openAiApi
→ollamaApi
openAiEmbeddingModel
→ollamaEmbeddingModel