# Integration Issue with Finetuned Embedding Inference Endpoint

**URL:** <https://discuss.huggingface.co/t/integration-issue-with-finetuned-embedding-inference-endpoint/125623>\
**Category:** Inference Endpoints on the Hub\
**Created:** [November 18, 2024, 9:49am UTC](https://discuss.huggingface.co/t/integration-issue-with-finetuned-embedding-inference-endpoint/125623 "2024-11-18T09:49:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kouskousi](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@Kouskousi](https://discuss.huggingface.co/u/Kouskousi)\
**Post date:** [November 18, 2024, 9:49am UTC](https://discuss.huggingface.co/t/integration-issue-with-finetuned-embedding-inference-endpoint/125623/1 "2024-11-18T09:49:24Z")

</div>

We recently created inference endpoint, which we use to run a finetuned embedding model on your GPU service. While the endpoint itself functions as intended, the request format it provides is difficult to integrate with our existing codebase. We followed the guide provided here: [https://huggingface.co/docs/inference-endpoints/guides/test\_endpoint](https://huggingface.co/docs/inference-endpoints/guides/test_endpoint) .

For a more seamless integration, we would like to use a method similar to the SentenceTransformer class from sentence\_transformers import SentenceTransformer ( i.e., embed\_model = SentenceTransformer( model\_name=model) ), as it would allow for a more compatible fit with our current implementation.

We attempted to utilize the `TextEmbeddingsInference` class from `llama_index.embeddings.text_embeddings_inference (`embed\_model = TextEmbeddingsInference( model\_name=model, base\_url=API\_URL, timeout=60, auth\_token=key )`)

However, when we call `embed_model.get_text_embedding("Test")`, we encounter an error.

Would you be able to provide guidance on this issue or suggest any corrections to our approach? Any assistance in resolving this would be greatly appreciated, as using SentenceTransformer or `TextEmbeddingsInference` directly would substantially streamline our integration process.

Thank you for your time and support.
