Several self-hosted embedding servers expose OpenAI-compatible /embeddings endpoints:
The current OpenAI provider has a hardcoded API_BASE_URL. A configurable base_url
would make all these work without needing separate provider implementations.
Possible API
client = Client()
response = client.embed(
model="BAAI/bge-small-en-v1.5",
inputs=["Hello world"],
base_url="http://localhost:7997" # or via env var
)
Since the request format is already OpenAI-compatible, only the URL routing would change.
Thanks for catsu, the unified API and model metadata catalog are really useful!
Several self-hosted embedding servers expose OpenAI-compatible
/embeddingsendpoints:The current OpenAI provider has a hardcoded
API_BASE_URL. A configurablebase_urlwould make all these work without needing separate provider implementations.
Possible API
Since the request format is already OpenAI-compatible, only the URL routing would change.
Thanks for catsu, the unified API and model metadata catalog are really useful!