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

The request to the /v1/embeddings endpoint returned a 404 status code. #298

Open
3 tasks
monkdharma opened this issue Jul 15, 2024 · 2 comments
Open
3 tasks

Comments

@monkdharma
Copy link

Model description

When I loaded the embedding model and tested the request, it returned a 404 status code. Is this because Infinity does not support requests in the form of /v1/embeddings?

curl http://127.0.0.1:8000/v1/embeddings \
    -X POST \
    -H 'Content-Type: application/json' \
   -d '{
  "model": "bge-large-zh-v1.5",
  "embedding_format": "float",
  "input": "What is Deep Learning"
  }'

Open source status

  • The model implementation is available on transformers
  • The model weights are available on huggingface-hub
  • I verified that the model is currently not running in the lastest version pip install infinity_emb[all] --upgrade

Provide useful links for the implementation

No response

Copy link
Contributor

greptile-apps bot commented Jul 15, 2024

The 404 status code indicates that the endpoint /v1/embeddings does not exist. The correct endpoint is /embeddings as defined in the FastAPI server implementation. Update your request URL to http://127.0.0.1:8000/embeddings.

References

/libs/infinity_emb/infinity_emb/engine.py
/libs/infinity_emb/infinity_emb/fastapi_schemas/convert.py
/libs/infinity_emb/infinity_emb/infinity_server.py
/libs/infinity_emb/tests/end_to_end/test_api_with_dummymodel.py
/libs/infinity_emb/tests/end_to_end/test_optimum_embedding.py
/docs
/docs/assets/openapi.json
/docs/docs/index.md

About Greptile

This response provides a starting point for your research, not a precise solution.

Help us improve! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

Ask Greptile · Edit Issue Bot Settings

@michaelfeil
Copy link
Owner

@monkdharma Please use the url-prefix feature for `v2 --url-prefix "v1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants