The community member is trying to use a custom embedding provided by an embedding server via HTTPS. They found documentation on how to use custom embeddings, but it did not show how to connect to something on the internet. The community members discuss how to send a POST request to the URL and check what is being sent. They provide example code, but the community member is encountering an issue where the code is trying to reach Hugging Face instead of the custom embedding server. The community members are unable to provide a clear answer to the issue.
def _get_query_embedding(self, query: str) -> List[float]:
# Send the POST request, data will be as per your embedding server standard
response = requests.post(url, json=data)
embeddings = response.json()
return embeddings
No sentence-transformers model found with name sentence-transformers/hub. Creating a new one with mean pooling.
OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like sentence-transformers/hub is not the path to a directory containing a file named config.json. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.