fix broken docs and compilation issues

This commit is contained in:
Christian Tzolov
2024-02-03 15:25:18 +01:00
parent 97537e0a10
commit 0a930d2ab5
2 changed files with 6 additions and 10 deletions

View File

@@ -122,15 +122,9 @@ public class OllamaEmbeddingClient extends AbstractEmbeddingClient {
if (options instanceof OllamaOptions ollamaOptions) {
runtimeOptions = ollamaOptions;
}
else if (options instanceof EmbeddingOptions embeddingOptions) {
// currently EmbeddingOptions does not have any portable options to be
// merged.
runtimeOptions = null;
}
else {
throw new IllegalArgumentException("Request embedding options are not of type EmbeddingOptions: "
+ options.getClass().getSimpleName());
}
// currently EmbeddingOptions does not have any portable options to be
// merged.
runtimeOptions = null;
}
OllamaOptions mergedOptions = ModelOptionsUtils.merge(runtimeOptions, this.defaultOptions, OllamaOptions.class);