meilisearch / meilisearch-js

JavaScript client for the Meilisearch API
https://www.meilisearch.com
MIT License
703 stars 85 forks source link

Update library for v1.7.0 #1632

Closed curquiza closed 3 months ago

curquiza commented 4 months ago

Based on https://github.com/meilisearch/integration-guides/issues/296

Make your changes on bump-meilisearch-v1.7.0 branch, cf the associated PR: https://github.com/meilisearch/meilisearch-js/pull/1631

TODO

Stabilization of scoreDetails

Hybrid search

Release a beta of the version

nicolasvienot commented 4 months ago

Understand why this test does NOT fail when running with v1.7.0-rc.X (cf CI). It should fail when trying to enable the exp feature because the feature is not activable as experimental anymore -> let us know in this issue about the investigation

We expected this test with version 1.7.0-rc.1 to fail when attempting to enable the experimental feature. The investigation revealed that sending a PATCH request to /experimental-features with { scoreDetails: true } correctly results in a 400 Bad Request error during the tests, which aligns with our expectations. However, the test's structure doesn't lead to a failure when encountering this error, allowing the test to proceed. The test ultimately passes because the feature in question has been enabled by default.

nicolasvienot commented 4 months ago

I've seen in the engine issue about dimensions for the openAi model that there are some limitations, such as:

"dimensions": 512 // must be >0, must be <= 3072 for "text-embedding-3-large"
"dimensions": 1024 // must be >0, must be <= 1536 for "text-embedding-3-small"
"dimensions": 1536 // must =1536  for "text-embedding-ada-002"

I'm assuming here meilisearch-js does not need to handle that and just needs to be able to send a dimensions field when doing a request to meilisearch. meilisearch will handle the error.

nicolasvienot commented 4 months ago

Looking to release a beta version using this PR

nicolasvienot commented 4 months ago

I created a release v0.38.0-v1.7.0-pre-release.0 by following the beta release process. It's based on this branch.

It's available in npm.

curquiza commented 4 months ago

I'm assuming here meilisearch-js does not need to handle that and just needs to be able to send a dimensions field when doing a request to meilisearch. meilisearch will handle the error.

Good guess! Nothing to handle on the library side, should be handled by the engine

curquiza commented 4 months ago

Thank you Nico for your work!