Skip to content

Fix the ONNX embedding example and defaults - #7342

Open
ultramancode wants to merge 1 commit into
spring-projects:mainfrom
ultramancode:fix/onnx-embedding-docs
Open

ultramancode wants to merge 1 commit into
spring-projects:mainfrom
ultramancode:fix/onnx-embedding-docs

Conversation

@ultramancode

Copy link
Copy Markdown
Contributor

I ran into compilation errors while trying the manual configuration example on the ONNX embedding reference page.

It declares List<List<Double>> although embed(List<String>) returns List<float[]>, and references this.embeddingModel instead of the declared local variable.

Fix the example and correct the outdated setup details. The default resources use HTTPS, the default cache directory is generated, and uncached HTTPS resources are downloaded during afterPropertiesSet() rather than the first embed() call.

I also compiled and ran the corrected example locally.

Signed-off-by: ultramancode <ktw2172@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants