Skip to content
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

Internal error Error while generating embeddings on wrong url #4618

Open
mdubus opened this issue May 2, 2024 · 2 comments
Open

Internal error Error while generating embeddings on wrong url #4618

mdubus opened this issue May 2, 2024 · 2 comments
Labels
bug Something isn't working as expected experimental feature Related to an experimental feature

Comments

@mdubus
Copy link
Member

mdubus commented May 2, 2024

Describe the bug

Trying to add an embedder with a wrong URL, I got an internal error on v1.8 rc-1 and rc-2 (but not rc-0)

To Reproduce
Steps to reproduce the behavior:

Try to add the following embedder:

   "default": {
        "source": "ollama",
        "url": "http://localhost:11434/api/embeddings",
        "apiKey": "<your-ollama-api-key>",
        "model": "nomic-embed-text",
        "distribution": {
            "mean": 0.7,
            "sigma": 0.3
        }
    }

Then wait a bit for the task to fail. The task should say:

 "error": {
                "message": "internal: Error while generating embeddings: runtime error: could not determine model dimensions: test embedding failed with runtime error: could not reach embedding server: http://localhost:11434/api/embeddings: Connection Failed: Connect error: Address not available (os error 99).",
                "code": "internal",
                "type": "internal",
                "link": "https://docs.meilisearch.com/errors#internal"
            },

Expected behavior
Not sure if this is an improvement or a regression, so not sure about the behaviour :)

Meilisearch version:
v1.8.0-rc.1 & v1.8.0-rc.2

@curquiza curquiza added the bug Something isn't working as expected label May 2, 2024
@dureuill
Copy link
Contributor

dureuill commented May 6, 2024

Hello,

it is expected that there is an error here. The input URL is wrong, so the operation cannot be expected to complete.


It is unexpected that the error is an internal error. It is unclear what kind of error it should be, probably a UserError?

The issue here could come from either:

  1. The user typing the wrong URL. OK for a UserError
  2. The network is down. Unclear what the error kind should be in the current error scheme.

@curquiza curquiza added the experimental feature Related to an experimental feature label May 6, 2024
@dureuill
Copy link
Contributor

dureuill commented May 6, 2024

As InternalError is going to get us bug reports, a quick fix could be to switch most embedder errors to UserErrors.

The defaults would need to be switched in this From impl

For a longer term fix, see #4620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected experimental feature Related to an experimental feature
Projects
None yet
Development

No branches or pull requests

3 participants